DNS issues on virtualmin vps

Hi, My VPS cant resolve domain names anymore. I havent changed anything, I tried adding forwarders to the BIND DNS server for 8.8.8.8 and 8.8.4.4 but when I try a ping from the command line I get: ping: unknown host www.google.co.uk
I tried to change DNS for the eth0 in networking but because it gets it via DHCP it just changes it back. I’m stumped as what i can try, its been working for 2 years without a hitch then just for no reason. I have asked the provider of the VPS to see if they have changed DNS at their end but no response of of yet, any suggestions anyone? thanks
ps this has now stopped backups to S3 and also email forms working, also slowed everything down it seems.

Have you tried to dig to see where its failing?

On cmd line… dig @8.8.8.8 domainname.com
If google doesn’t show your ip/dns…
Then dig @your-nameserver-ip domain.com. Which should show an IP for the domain and an authoritative section listing all your dns servers.

OR go to mxtoolbox.com and do their dns diagnosis tests. Should be able to figure out where its failing from that.

Dig not installed on VPS and cant install as it cant resolve the download url. I manually change the dns server from 127.0.0.1 to 8.8.8.8 in the resolv.conf but I still couldnt ping external websites.

Oh, so it not a dns issue with your domains its a dns resolving issuing with ALL domains.
Can you ping 8.8.8.8? But not google.com? That is a network config issue for eth0 device. You where right to look for resolve.conf but depending on which OS you have, dns server config lines might not be located there any more. I know ubuntu changed a couple version ago.

Hi no I cant ping 8.8.8.8 only internal like 127.0.0.1 I get a response. On this I contacted the VPS provider and asked them what the correct default gateway is. They came back with something different than what the NIC is getting from DHCP. What I’m worried about is if I change to the one they said if incorrect I will not be able to connect to my VPS to change it back, Would you agree?

I don’t see how you’re getting in at all, if it cant ping the gateway.
Are you getting in over SSH? Or a remote terminal provided by the host?

If over ssh, you you will lose connection if gateway is not correct. Are you possibly getting in over ipv6? is that why its working with wrong ipv4 gateway? try ping6 google.com or ping6 2606:4700:4700::1111 (cloudflare’s dns)

@whirlweb,

You don’t add forward DNS records to BIND to fix a resolution issue. Rather you adjust the “/etc/resolv.conf” file and add…

nameserver 8.8.8.8
nameserver 8.8.4.4

This file assigns the system resolvers so that when you do a “ping google.com” it will use one of the above nameservers to resolve the domain…

Best Regards,
Peter Knowles | TPN Solutions

The provider ask me to reboot from their console rather than from virtualmin, that sorted it and everything now working. Not sure what diference rebooting from virtualmin is different from rebooting from the VPS’s providers control panel. I think its a routing thing thats been updated but just guessing.

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.