Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I can't connect my linux client to my linux dns server.In the client machine /etc/resolv.conf file is look like this:-
search localdomain
nameserver 127.0.0.1
nameserver 172.168.1.200 (my dns server ip)
what troubleshooting have you tried before posting here? can you ping it? is your network working at all outside of dns? is the IP right? it shouldn't be, 172.168.1.200 is a public ip address, but looks like it's been uased as a local one, do you mean 192.168.1.200 or 172.16.1.200? both of those are legit private LAN ip addresses
In my lab i have a linux dns server which ip is 172.168.1.200 and 2 linux clients. I can't connect my linux client to my linux dns server. My pcs are connect through local LAN.I use private ip.I am able to ping my dns server but can not resolv its name.
In the client machine /etc/resolv.conf file is look like this:-
search localdomain
nameserver 127.0.0.1
nameserver 172.168.1.200 (my dns server ip)
Or try running a dig query against the nameserver. And if you can't resolve it's name, does it have a name for resolution? Is this nameserver public as well? Do you actually have a name associated with this DNS servers hostname or domain you want?
If you can ping your dns server then OK now try a lookup against it.
Code:
dig yahoo.com 192.168.1.2
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 5554
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 7, ADDITIONAL: 7
;; QUESTION SECTION:
;yahoo.com. IN A
;; ANSWER SECTION:
yahoo.com. 173 IN A 66.94.234.13
yahoo.com. 173 IN A 216.109.112.135
;; AUTHORITY SECTION:
yahoo.com. 101581 IN NS ns4.yahoo.com.
yahoo.com. 101581 IN NS ns5.yahoo.com.
yahoo.com. 101581 IN NS ns6.yahoo.com.
yahoo.com. 101581 IN NS ns8.yahoo.com.
yahoo.com. 101581 IN NS ns1.yahoo.com.
yahoo.com. 101581 IN NS ns2.yahoo.com.
yahoo.com. 101581 IN NS ns3.yahoo.com.
;; ADDITIONAL SECTION:
ns1.yahoo.com. 18117 IN A 66.218.71.63
ns2.yahoo.com. 90372 IN A 68.142.255.16
ns3.yahoo.com. 49353 IN A 217.12.4.104
ns4.yahoo.com. 31549 IN A 68.142.196.63
ns5.yahoo.com. 38728 IN A 216.109.116.17
ns6.yahoo.com. 24524 IN A 202.43.223.170
ns8.yahoo.com. 108139 IN A 202.165.104.22
;; Query time: 14 msec
;; SERVER: 192.168.1.2#53(192.168.1.2)
;; WHEN: Thu Mar 13 09:37:44 2008
;; MSG SIZE rcvd: 297
; <<>> DiG 9.3.4 <<>> yahoo.com 192.168.1.2
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 13122
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;192.168.1.2. IN A
;; AUTHORITY SECTION:
. 6762 IN SOA a.root-servers.net. nstld.verisign-grs.com. 2008031201 1800 900 604800 86400
;; Query time: 12 msec
;; SERVER: 192.168.1.2#53(192.168.1.2)
;; WHEN: Thu Mar 13 09:37:44 2008
;; MSG SIZE rcvd: 104
Now if you get a response, great if not then you most likely do not have your nameserver set to resolve or allow queries outside the scope of localhost.
On your client I would make the resolv.conf
Code:
nameserver 172.168.1.200
only for right now. And I agree, that ip looks wrong to me to be an internal private lan ip.
I think what the OP is trying to explain is that they can't connect to their nameserver by it's hostname given. What they need to do is add actual DNS entries for this host so they can resolve by name. Even the DNS server needs an entry if you want to reach it by name and not just IP.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.