I’ve been searching far and wide and no one really explains what’s supposed to go in this file from a simple point of view, what sort of options do I have?
At the moment I have purchased a VPS with a dedicated IP. I have set-up name-servers under the domain 888×7.com and assigned ns1.888×7.com (ns2 also) with the IP 109.169.46.109.
If you query the IP you get a test page, web server is working.
But if you try to access the page using 888×7.com or any other domain linked to both ns1 & ns2 you get the error:
ERR_NAME_RESOLUTION_FAILED
currently my resolv.conf looks like this:
nameserver 109.169.46.109 888x7.com
nameserver 109.169.46.109 lolysoft.com
Is this correct? No where online (that I can find) does it describe this file in in detail.
Can someone point me in the right direction?
“man resolv.conf” will document what can go in this file.
You can also view it online here:
http://linux.die.net/man/5/resolv.conf
The nameserver directive should only contain the ip address of the nameserver, not it’s hostname.
If you need to name some hosts that are not in DNS, you do that in the /etc/hosts file.
my hosts file on my VPS:
This is there so that it can still resolve itself if the nameservers go down. Basically network name resolution goes first to the hosts file and then to DNS if the host isn’t listed there. You can see what your server is set to do by looking at /etc/nsswitch.conf at the hosts directive (the attribute files means /etc/hosts and related files).
Now resolv.conf is to direct the system how to use the DNS system for network name resolution. My VPS’s /etc/resolv.conf where I’m using one of Google’s nameservers to resolve hosts.
The resolv.conf from my local machine (I run my own DNS server to serve my own private network at home):
The domain is just something I made up and hopefully no one ever uses (watch some joker decide to register it now). The search line basically sys that if I do “ping printer1” to treat it as if I did “ping printer1.ejnhome.net”.
Ultimately I would try and find someone locally (friend or professional) who can help you. Attending a local Linux User Group (LUG) might help you find someone who is an enthusiastic amateur to give you a hand. Hopefully the real world examples help. I have 15 years of sys admin experience so sometimes I don’t dumb it down far enough.