Probably because the domain points to Hetzner’s DNS service where I have this:
$ORIGIN foo.com.
$TTL 60
; SOA Records
@ IN SOA hydrogen.ns.hetzner.com. dns.hetzner.com. 2023122711 86400 10800 3600000 3600
; NS Records
@ 60 IN NS helium.ns.hetzner.de.
@ 60 IN NS hydrogen.ns.hetzner.com.
@ 60 IN NS oxygen.ns.hetzner.com.
; MX Records
@ 60 IN MX 10 mail
; A Records
@ 60 IN A 1.1.1.1
dns1 60 IN A 1.1.1.1
dns2 60 IN A 2.2.2.2
mail 60 IN A 1.1.1.1
www 60 IN A 1.1.1.1
And I had to use Hetzner’s cause OVH (or any other registrar) does not allow to point my domain to 1.1.1.1 and 2.2.2.2 but FQDN Name servers.
That’s why I asked for any example of registrar that allows for this. Cause it’s not so easy as you can see.
$ host dns1.foo.com 1.1.1.1
Using domain server:
Name: 1.1.1.1
Address: 1.1.1.1#53
Aliases:
dns1.foo.com has address 1.1.1.1
$ host dns2.foo.com 1.1.1.1
Using domain server:
Name: 1.1.1.1
Address: 1.1.1.1#53
Aliases:
When asking my secondary (Virtualmin Slave) DNS:
dns2.foo.com has address 2.2.2.2
$ host dns1.foo.com 2.2.2.2
Using domain server:
Name: 2.2.2.2
Address: 2.2.2.2#53
Aliases:
dns1.foo.com has address 1.1.1.1
$ host dns2.foo.com 2.2.2.2
Using domain server:
Name: 2.2.2.2
Address: 2.2.2.2#53
Aliases:
dns2.foo.com has address 2.2.2.2
So… Should be working, right?
So let’s try to change Name Servers on my registrar so my domain foo.com would have the following NS:
dns1.foo.com
dns2.foo.com
Unfortunatelly error:
Unable to retrieve the IP address of host dns1.foo.net.pl. This IP is required to attach this host to the domain name.
As a reminder - here’s my domain config:
Domain Nameservers:
$ host -t NS foo.com
foo.com name server hydrogen.ns.hetzner.com.
foo.com name server helium.ns.hetzner.de.
foo.com name server oxygen.ns.hetzner.com.
Hetzner DNS zone:
$ORIGIN foo.com.
$TTL 60
; SOA Records
@ IN SOA hydrogen.ns.hetzner.com. dns.hetzner.com. 2023122901 86400 10800 3600000 3600
; NS Records
@ 60 IN NS helium.ns.hetzner.de.
@ 60 IN NS hydrogen.ns.hetzner.com.
@ 60 IN NS oxygen.ns.hetzner.com.
dns1 IN NS 1.1.1.1
dns2 IN NS 2.2.2.2
; MX Records
@ 60 IN MX 10 mail
; A Records
@ 60 IN A 1.1.1.1
dns1 60 IN A 1.1.1.1
dns2 60 IN A 2.2.2.2
mail 60 IN A 1.1.1.1
www 60 IN A 1.1.1.1
As you can see I’ve added on Hetzner’s DNS both A and NS records pointing at my servers but for some reason I cannot resolve them still.
This is nonsense. An NS record provides the name of a name server, not an IP. A records map names to addresses.
Your records should look like what you had way up at the top (you had it right, you’ve now broken it).
@ IN NS dns1.foo.com.
@ IN NS dns2.foo.com.
Or just:
IN NS dns1.foo.com.
IN NS dns2.foo.com.
I can’t believe BIND didn’t report errors about that. Check your named log (probably in the journal, so journalctl -fu named to tail the log and then restart the service, I bet you have errors).
To be clear, this says, “the name server for the dns1.foo.com. zone is 1.1.1.1”, so you’ve created a new zone called dns1.foo.com (and tried to say the name server is 1.1.1.1 which is an illegal name), and this is a record for that zone. This is not an NS record for your foo.com. zone.
I have no idea why the OP is transfixed on ip addresses for name servers any ideas ? The rest of the planet use domain names. way back in the early part of the thread I tried to explain how to do it with no pain but with ease … but as usual I was talking testicals !
so just so, if the OP wishes to get 2 running DNS servers hosted by himself here is a method that works & is reliable
start from scratch
make sure all domains have their name servers set to the registrars name servers.
set up the webmin dns servers to talk to each other using webmin servers index & webmin bind module → cluster slave servers → add on both webmin servers. this enables both to be a slave of each other.
make sure both webmin dns servers are transferring data correctly between themselves by making changes to their DNS records and viewing the results
use a valid (spare domain name to act as the resolver) we will call this nameserver.com as no one around here seems happy giving out domain names or ip addresses
once both have resolved go to the registrants dns settings page for foo.com and change the name servers to ns.nameserver.com & ns1.nameserver.com, this will mean foo.com’s dns records are now maintained by the 2 virtualmin servers. So you will need to change (depends on setup) foo.com’s name server records using webmin/virtualmin to reflect ns.nameserver.com & ns1.nameserver.com
At one point I did change the nameservers for nameserver.com to ns.namesever.com & ns1.namserver.com, which worked but I didn’t feel that was a reliable option, as if something went wrong the domains managed could all fail to resolve as the name servers would not resolve in the first place
The reason why I am transfixed is because your tone is abrasive, rude and you’re entitled to know everything about anything.
Joe is actually willing to help (thank you Joe!) whilst your tone is to be ever-knowing-all mr. mastah-of-disastah
As for the rest of your post - thank you. That’s a proper, solving issue attempt response.
Will try that out. Maybe you should try using this tone more often? </mean mode off>
Thank you! For all of the responses. I’ve actually paid for some support in order to get this done. Will share a proper guide about it once I achieve my goal. This is my contribution to this community and Virtualmin developers.
I guess this to be my translation to English from my own language and maybe you translating my English back to your language. Nothing malicious was ever intended