Missing DNS Zone entry warning, although site is working ..

Hi guys … I’m completely new to virtualmin, and have recently set it up on a VPS to run my site through (its only one site - my own).

My site seems to be working fine. I can go to example.com, and my site loads fine. However when I log into Virtualmin and click on the check configuration button on the home page, I get this error:

Virtualmin is configured to setup DNS zones, but this system is not setup to use itself as a DNS server. Either add 127.0.0.1 to the list of DNS servers, or turn off the BIND feature on the module config page. It appears that DHCP is being used to dynamically configure your network interfaces, which can cause the DNS servers to be set based on settings provided by the DHCP server. Using a static IP address is strongly recommended with Virtualmin.

Can someone break down this error for me, and tell me what’s the problem ?

A related issue I have is that if I ping example.com from my PC (example.com = my site), it pings fine, to the IP of the VPS. However, if I ping virtualmin.example.com (hostname of my VPS), it cannot resolve the IP. I say this is an issue because if I want to open up the virtualmin panel from my own PC, I have to type https://IP:10000. This is kinda hard because I don’t know the IP by heart, and would prefer if I can load it through https://virtualmin.example.com:10000, if possible …

I think the errors are quite self-explanatory. :wink: I wouldn’t really know what to add.

To resolve (new) locally hosted domains, before their DNS entries have propagated, it is advisable to use the local BIND as first resolver, and then if required that of your provider.

As for the DHCP, what kind of server do you have there? If it has a static IP address, you should turn off the DHCP client, even if it’ll always assign you the correct IP, and configure the address statically.

Both of those are not errors though, but rather warnings that the current configuration CAN lead to undesired behavior, like new domains not resolving locally, or the DNS IP address changing due to DHCP.

To do tests with “virtualmin.domain.com”, you’d need to give us the actual domain name and not a placeholder. You can edit the true names out again later if secrecy is an issue.

Well the IntoDNS result looks okay, except for the warning with the serial (usual format is YYMMDDNNN, Year Month Day Number) and the missing reverse record. The latter you’d need to configure with your hoster.

The configuration looks okay too, except I don’t see a “virtualmin.domain.tld” record in your zone file, so no wonder that name doesn’t resolve. :slight_smile: You need to put it in the zone.

Is the external and internal IP static, and just going through some router? In that case, you should be fine. Just add “127.0.0.1” to the top of your list of nameservers in Webmin’s Networking Config module, and turn off the DHCP client (it’s a service, look in Webmin’s Bootup and Shutdown module).

But what about the original issue which I was talking about ? I mean what is the cause behind this message, which I still get in Virtualmin:

Virtualmin is configured to setup DNS zones, but this system is not setup to use itself as a DNS server. Either add 127.0.0.1 to the list of DNS servers, or turn off the BIND feature on the module config page. It appears that DHCP is being used to dynamically configure your network interfaces, which can cause the DNS servers to be set based on settings provided by the DHCP server. Using a static IP address is strongly recommended with Virtualmin.

Where exactly do I put “virtualmin.domain.tld” ? In the DNS Records text ? Can you tell me the exact text to put in there ? And do I really put “virtualmin.domain.tld” in there, or do I replace “domain” with my my website URL domain ? :stuck_out_tongue:

Regarding the IPs, well the external IP is confirmed static (otherwise I would be changing nameservers daily :slight_smile: ). The internal IP is currently not explicitly set statically. Technically its DHCP I think, but since there’s only one VM insert the virtual network, normally it ends up getting the same IP. I can change this though, and tell the router to specifically ALWAYS give the VM a static internal IP.

Also, any other changes you recommend in the settings I posted ?

The “original issue” will of course go away when you fix those issues, i.e. as I said or as the messages say, put 127.0.0.1 in the list of nameservers and turn off DHCP. :slight_smile:

For the DNS records, go to the place where you took the screenshot of the DNS records, click “manually edit”, and duplicate e.g. the “www” line, and replace www with virtualmin. Keep the rest as it is.

You should make sure that both the external AND internal IP are static. Otherwise you’ll get into lots of trouble (having to switch IPs in your Apache config files or BIND zones and glue records around all the time and stuff). Web hosting does not really fare well on dynamic IPs, it complicates things a LOT.

I don’t recommend other changes unless things don’t work. :slight_smile:

Thanks dude. Needless to say, you’ve been a great help so far, in this thread and in other threads ! :slight_smile:

Regarding putting 127.0.0.1 in webmin’s list of nameservers, I tried to look for this, but couldn’t get really far. I found this: Webmin >> Servers >> BIND DNS Server, but then I couldn’t figure out things beyond that. Also, on the said page, 127.0.0.1 is already listed under Existing DNS Zones (see attached picture). Did you mean that maybe ?

Yes you’re right about having a static IP, so I’ll try to fix a static internal IP right now.

Nameserver list (i.e. for the local resolver client) is configured in Webmin module “Networking / Network Configuration / Hostname and DNS Clients”. :slight_smile:

Okay got it. Attaching a new picture of what I see here currently. I see a list with IPs for DNS Servers:

  • 10.1.1.1
  • 8.8.8.8
  • 4.2.2.2

You’re saying that I put 127.0.0.1 at the top here ?

  • 127.0.0.1
  • 10.1.1.1
  • 8.8.8.8
  • 4.2.2.2

Secondly, regarding turning off that DHCP service you told me earlier, I went into Webmin >> System >> Bootup and Shutdown, but I don’t see any service listed here which mentions “dhcp”. Attaching a picture of the list of services I see here.

  1. Yep, exactly!

  2. You’re right, I mixed that up with Windows, where there’s a DHCP Client service. :slight_smile: On Webmin, you just need to go to Webmin -> Networking -> Network Configuration -> Network Interfaces, then choose your primary interface, and switch “IPv4 Address” from “DHCP” to “Static Configuration”. Same with IPv6 if applicable. Then click “Save and Apply”.

Alright, I think I’ve run into some problem :frowning:

I did those two things:

  1. First, I went into Webmin >> Networking >> Network Configuration >> Hostname and DNS Clients, and set the DNS Servers values in this specific order:
  • 127.0.0.1
  • 10.1.1.1
  • 8.8.8.8
  • 4.2.2.2

I clicked Save, and it saved, no problems.

  1. Then I went to Webmin -> Networking -> Network Configuration -> Network Interfaces >> etho, and set values for IPv4 as follows:

Static configuration:

  • IPv4 address: 10.1.1.217
  • Netmask: 255.255.255.0
  • Broadcast: Automatic

Then I clicked Save and Apply button at the bottom. The second I clicked it, virtualmin’s console stopped responding (stuck in the loading stage). I waited for 5-6 minutes, but nothing. I tried connecting via putty, no response. :frowning:

I have attached a picture of how I configured this IP setting

Rebooted the VM from my provider’s console, but still I cannot access virtualmin’s web console, or connect via putty.

I CAN still connect through my hosting provider’s hardwired console, which lets me access the terminal and login as root. So I can run commands here.

Please tell me how to fix this issue ASAP :frowning:

What’s the problem here :frowning:

Alright, I’ve managed to revert the changes by manually editing /etc/sysconfig/network-scripts/ifcfg-eth0 and /etc/resolv.conf.

The problem is definitely with the second thing I did: switch to Static IP from within Webmin. Details below:

  1. I first reverted both changes and rebooted. This resolved the issue. I was able open my website again, open virtualmin’s console panel, and also connect via putty.

  2. Then I tried changing ONLY the DNS Servers list, and added 127.0.0.1 at the top, and again rebooted (to make sure all changes take effect). Still, I was able to do everything.

Also, when I reverting the original two changes, I first reverted ONLY the DNS Server change, but still it did not fix the problem. Problem only got fixed when I switched back to DHCP.

So for some reason, DHCP setting seems to work, whereas static IP setting does not.

Although, when static IP was ON, I did ifconfig, and the VM did have an IP, etc … So I don’t know what the problem is.

Below is the contents of /etc/sysconfig/network-scripts/ifcfg-eth0 when STATIC IP was being used:

IPV6INIT=yes
HWADDR=02:00:2D:D9:00:01
BROADCAST=""
UUID=91470e79-0e03-442c-b58f-f0b101a7cfd3
BOOTPROTO=none
NAME=""
NM_CONTROLLED=yes
MACADDR=""
TYPE=Ethernet
DEVICE=eth0
IPV6_AUTOCONF=yes
NETMASK=255.255.255.0
MTU=""
IPADDR=10.1.1.217
NETWORK=10.1.1.0
ONBOOT=yes

And below now is the contents of /etc/sysconfig/network-scripts/ifcfg-eth0 when I switched to DHCP IP again:

IPV6INIT=yes
HWADDR=02:00:2D:D9:00:01
BROADCAST=""
UUID=91470e79-0e03-442c-b58f-f0b101a7cfd3
BOOTPROTO=“dhcp”
NAME=""
NM_CONTROLLED=yes
MACADDR=""
TYPE=Ethernet
DEVICE=eth0
IPV6_AUTOCONF=yes
MTU=""
NETWORK=10.1.1.0
ONBOOT=yes

So what’s the problem ?

You can use the command “ifconfig” to determine the current IP and other network parameters of your virtual machine, when it was assigned through DHCP and is working correctly. Make sure that the IP address, network mask and broadcast address, and the default gateway under “Routing and Gateways” are configured properly. The default gateway is also assigned through DHCP and needs to be set correctly when manually configuring the interface.

Well the Gateway address was missing. I added that (GATEWAY=10.1.1.1) in /etc/sysconfig/network-scripts/ifcfg-eth0 and it worked fine ! That warning on configuration check is gone now :slight_smile:

Sure, I can tell you the domain :slight_smile:

The domain is b-----------k, and you can view its details here http://www.intodns.com/b---------------k

The VM running the site is actually inside a virtual network (my hosting is cloud based, so I can instantly spawn/kill VMs, routers, networks, etc), and the VM has an internal NAT IP. But, I enabled a setting to kill virtualmin to automatically detect the external IP. Also, I’m not sure if currently DHCP is enabled or not in Virtualmin. I don’t know how to check that within virtualmin yet.

I’m posting photos of my virtualmin’s network settings, and the IP address, DNS records and DNS options settings of the domain, with this email.

If you see anything wrong with the configuration, please do let me know.