How to determine DNS service provider's URL for a specific domain? - dns

Given a domain, such as "test.com", is there a reliable way to determine who hosts the DNS for the domain, and provide a link to the provider? Specifically, I want to be able to inform a user of our software how they can update their DNS, and provide them a link to the service.
I can run dig test.com NS and get the response,
test.com. 0 IN NS ns3.hosting.com.
test.com. 0 IN NS ns1.hosting.com.
test.com. 0 IN NS ns2.hosting.com.
So in this case, I guess hosting.com is the DNS provider, and I could provide that...
But in other cases, I get responses like ns-54.awsdns-06.com. I assume then that the DNS provider is AWS Route53, but from this response I can't determine that the user should visit https://aws.amazon.com/route53/
Does anyone know of a service (preferably a npm package) which would provide this type of mapping to a DNS provider's service URL?

Related

Can you override a DNS entry that you've delegated to another name server?

Let's say I have two DNS servers
DNS Server 1 (dnsserver1.com)
test.mydomain.com NS dnsserver2.com
hello.test.mydomain.com CNAME www.apple.com
DNS Server 2 (dnsserver2.com)
hello.test.mydomain.com CNAME www.google.com
According to my tests, if you visit hello.test.mydomain.com it'll display google.com, but I'm wondering if there's a way to override the delegation. Reason for this being that I'm switching my second DNS server (dnsserver2.com -> dnsserver3.com) and I would like to test this new delegation by individually overriding entries before I swap over the entire delegation.
I think I found my answer here, specifically:
Also note that any local zones you create would step on and override any outside DNS server's zones: It's not possible to have the A record for pc.home.mydomain.tld come from one NS and the AAAA record for it come from another: DNS delegates and declares authority by zone name, and that authority is for all record types within that zone.
If a nameserver is told it is authoritative for something and can't find the record it will not forward the query up the DNS tree, it will simply return NXDOMAIN.
As a result, my plan is to delegate individual records a second time like so:
DNS Server 1 (dnsserver1.com)
test.mydomain.com NS dnsserver2.com
DNS Server 2 (dnsserver2.com)
hello.test.mydomain.com NS dnsserver3.com
DNS Server 3 (dnsserver3.com)
hello.test.mydomain.com CNAME www.apple.com

Cloudflare settings when registrar requires IP addresses

I signed up to Cloudflare, and got nameservers assigned, but within my registrar's DNS settings, I need to enter an IP address along with each NS. I tried using random addresses from this page, but my registrar won't take subnet masks (/<number> after the IP). The site this is for is hosted with WP Engine.
What IP addresses should I use along with each Cloudflare NS on my registrar's DNS settings. TIA.
When moving to Cloudflare you can't merely set an NS DNS record, you actually need to move your Authoritative Name Server to Cloudflare.
An NS record is used to delegate a subdomain to a set of name servers, but in order to use Cloudflare you need to actually delegate the Name Servers of your domain to Cloudflare.
There are tutorials on how you can do this on the Cloudflare Help Centre: How do I change my domain nameservers?
One workaround I've found was to use https://www.whatsmydns.net or ping the NS, then I entered the IP addresses I had found.

how connect my own server to a domain?

I have a dedicated server in my office and it has a static IP on internet, now i want to connect this server to a domain and setup mail server on it.
my only problem is how to connect IP and domain?
I have some questions about this but can't find answer by searching, please help me:
If i had to create my own dns server to handle it? if so how to run dns server
to create mail server that reliable by gmail and other mail-servers i had to provide RDNS to my server, how?
Thanks in advanced
Assuming that you have registered a domain already, you add an A record, which specifies hostname and ip address of your server. You don't need to install your own nameservers, if you use services of a DNS hoster. Many registrars, where you can register a domain, also offer such DNS hosting services. However, regardless of who runs the nameservers which are authoritative for your domain, you will still need to add that A record to your zone on the master nameserver. Depending on used service, you may then have to update SOA serial, and issue an update notification to slave nameservers, so they know that they must ask master nameserver for the updated zone - but most DNS hosters do this step automatically.
For reverse DNS, you add a PTR record to reverse zone. The netblock owner is in control of the reverse zone.
The nameservers authoritative for reverse zone are generally different servers than those you put hostname and ip address of your server on, and you will have to use facilities or cooperation offered by netblock owner.

NS forwarding for CMS future thinking

I'm designing a CMS,
my users want to attach theyr domain to the websites they build,
i can give them the NS of my storage company, but my fears are if i change storage company,
than im changing NSs too and thats not possible.
is there a way to do ns forwarding or a paid ns service that forwards to a desired ns so i can tell my users to forward theyr NS to my NS service and mine will transfer the connection to the current NS?
If anyone is looking for an answare i solved this by setting up my own dns server called "BIND" in linux, still configuring it but it seems to solve the problem with forwarding all the traffic from ns1.domain.com and ns2.domain.com to the same ip (current hosting) and if i change storage company i set everything up and just change the ip to forward to.

Setting up a custom nameserver with BIND9

Lets say that I purchased a new domain (somedomain.com) from a domain registar and I wanted to setup my own nameserver on a server that has two IP addresses.
First I buy the domain.
I get the server.
install BIND9.
I login to the server and prepare the DNS records for NS1.SOMEDOMAIN.COM and NS2.SOMEDOMAIN.COM.
Where do I set these up in BIND and how should I do it?
Next Step:
Go back to the domain registar and set the DNS to point to NS1.SOMEDOMAIN.COM and NS2.SOMEDOMAIN.COM.
Is it a bad thing if the domain that I am forwarding is pointed to its OWN nameserver domain? Should I change this? How does it know where NS1 and NS2 go when both subdomains are apart of the domain that is being forwarded to them?
Should I just use the DNS provided by my registar and make two CNAME record entries for NS1 and NS2 to point to the server ips of the newly created DNS server? Would this work?
Can anyone explain this process to me? Thanks.
Do add the following step which is crucial to using your name servers in the WHOIS record:
Step 5: Go back to your registrar (wherever you bought the domain in step 1) and create the special NameServer records in their administrative control panel; for example, on godaddy.com, you need to go to advanced > hosts and there you can set up ns1 to point to the IP address of your server (step 2).
You will need to do the same for ns2.
This will vary from registrar to registrar, consult their documentation or contact customer support.
Step 6: Update the WHOIS record to reflect your new nameservers.
Where do I set these up in BIND and how should I do it?
You would set these up in the domain's zone record, not unlike this:
yourdomain.com. IN SOA ns1.yourdomain.com. you.yourdomain.com. (
1032789388
10800
3600
604800
300 )
yourdomain.com. IN NS ns1.yourdomain.com.
yourdomain.com. IN NS ns2.yourdomain.com.
ns1.yourdomain.com. IN A xxx.xxx.xxx.xxx
ns2.yourdomain.com. IN A yyy.yyy.yyy.yyy
Is it a bad thing if the domain that I am forwarding is pointed to its OWN nameserver domain? Should I change this?
Running DNS from the same domain is fine.
How does it know where NS1 and NS2 go when both sub-domains are apart of the domain that is being forwarded to them?
See Step 5 above - your registrar handles this bit, registering your name servers and allowing them to participate in the 'net.
Should I just use the DNS provided by my registar and make two CNAME record entries for NS1 and NS2 to point to the server ips of the newly created DNS server? Would this work?
This would not work as you would still need to do Step 5; to be honest, I'm not sure what would happen if you did not serve the DNS for ns1 off of the same host.
Additional note:
While you CAN run one DNS server for both ns1 and ns2, it is not recommended.
Usually you want your secondary (slave) DNS server to be as far away as possible from your primary (master) DNS server... located in a different country is usually the best.
But, there is nothing technically preventing you from using two different IPs on the same physical hardware.

Resources