These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for DNS Issues on the new forum.
Hi Everyone, I am having a few issues with my new Virtualmin setup. When i first installed it everything was working fine and then it stopped. I can view websites with internal IP address but not via domain names.
I get ERR_NAME_RESOLUTION_FAILED
When using the dig command i get a blank output where as before i got a full output of domain name and public IP etc. I am assuming something has changed with the Bind setup which is effecting the dns resolution.
The Bind DNS records are here https://imgur.com/a/VpmmfJe
Can't think what is missing to stop it resolving
Any help would be much appreciated
Thanks
Rockyuk
Have you done "dig @1.1.1.1 domainname.com" to see if public dns servers have the ip?
Also do a "dig @yourdnsserver domainname.com". That will let you know if your dns has it and public does not. Output of those two commands should be the same.
Be sure the glue records for the domain are pointing to your dns server.
What do you mean by internal IP? Like behind a router with lan IP? If thats the case then dns records should have your public IP not lan IP. Which I think you showed in the image but all those A records and NS records should be pointing to the public IP. Not just the one you marked.
[root@server ]# nano /etc/named.conf GNU nano 2.3.1 File: /etc/named.conf
};
logging { channel default_debug { file "data/named.run"; severity dynamic; }; };
zone "." IN { type hint; file "named.ca"; };
include "/etc/named.rfc1912.zones"; include "/etc/named.root.key";
zone "mydomainname.com" { type master; file "/var/named/mydomain.com.hosts"; allow-transfer { 127.0.0.1; localnets; }; };
dig @1.1.1.1 mydomain.com
; <<>> DiG 9.9.4-RedHat-9.9.4-72.el7 <<>> @1.1.1.1 mydomain.com ; (1 server found) ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 15374 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 1452 ;; QUESTION SECTION: ;mydomain.com. IN A
;; Query time: 4013 msec ;; SERVER: 1.1.1.1#53(1.1.1.1) ;; WHEN: Mon Jan 28 14:41:26 GMT 2019 ;; MSG SIZE rcvd: 50
I have attached 2 more screenshots
Bind Global Options & DNS Records within Virtualmin
https://imgur.com/a/fiIToWv
dig @ 1.1.1.1 got no result so the local dns is not updating to the world. Does "dig @127.0.0.1 domain.com" work?
It should show a line without a ;; like....
;; ANSWER SECTION:
domain.com. 10695 IN A x.x.x.x
I think i resolved it, i believe it was Modsecurity blocking access. I whitelisted the servers IPs remote and local and all seems to be working now. Thank you for your help and assistance .