DNS Issues

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.


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

Can’t think what is missing to stop it resolving

Any help would be much appreciated



Have you done “dig @ 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

    session-keyfile "/run/named/session.key";
    allow-query {


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 {;

dig @ mydomain.com

; <<>> DiG 9.9.4-RedHat-9.9.4-72.el7 <<>> @ 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

; EDNS: version: 0, flags:; udp: 1452
;mydomain.com. IN A

;; Query time: 4013 msec
;; 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


dig @ got no result so the local dns is not updating to the world. Does “dig @ domain.com” work?

It should show a line without a ;; like…
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 .