LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Restarting dns service (https://www.linuxquestions.org/questions/linux-newbie-8/restarting-dns-service-691218/)

sandeepthug 12-17-2008 08:26 AM

Restarting dns service
 
Hi am not able to resolve hostnames in LAN
however on server it is working fine

quick response would be appreciated

thanks
sandeep

eco 12-17-2008 08:32 AM

Hi,

Have a look on both server and workstation what's in /etc/resolv.conf

This will list what DNS servers are being used. I suspect the server uses your providers DNs and your workstation uses the one running on your server... which does not seem to be running.

Best of luck.

sandeepthug 12-17-2008 08:43 AM

thanks for the quick reply

im using windows machines on lan
and the contents of /etc/resolv.conf are

search viewhosting.com
nameserver 127.0.0.1
nameserver 208.67.222.222
nameserver 192.168.3.1

eco 12-17-2008 09:00 AM

OK,

Try this.

On Your Linux server, type:

host www.google.com 127.0.0.1
host www.google.com 208.67.222.222
host www.google.com 192.168.3.1

See which replies?

On windows do the same in a 'shell' (CMD)

nslookup www.google.com <Linux server IP>
nslookup www.google.com 208.67.222.222
nslookup www.google.com 192.168.3.1

Report back your findings :)

sandeepthug 12-17-2008 09:16 AM

on linux mahine

host www.google.com 127.0.0.1
;; connection timed out; no servers could be reached

host www.google.com 208.67.222.222
Using domain server:
Name: 208.67.222.222
Address: 208.67.222.222#53
Aliases:

www.google.com is an alias for google.navigation.opendns.com.
google.navigation.opendns.com has address 208.67.217.231
google.navigation.opendns.com has address 208.67.217.230

host www.google.com 192.168.3.1
;; connection timed out; no servers could be reached


on windows machine

nslookup www.google.com 127.0.0.1
*** Can't find server name for address 127.0.0.1: No response from ser
Server: UnKnown
Address: 127.0.0.1

*** UnKnown can't find www.google.com: No response from server


nslookup www.google.com 208.67.222.222
Server: resolver1.opendns.com
Address: 208.67.222.222

Non-authoritative answer:
Name: google.navigation.opendns.com
Addresses: 208.67.217.231, 208.67.217.230
Aliases: www.google.com


nslookup www.google.com 192.168.3.1
Server: router
Address: 192.168.3.1

DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
*** Request to router timed-out

eco 12-17-2008 09:24 AM

Hi,

So the only DNS that works for you is 208.67.222.222

On your Linux server, change your resolv.conf to:
search viewhosting.com
nameserver 208.67.222.222

On windows, edit your DNS settings to include the above IP.

You can check what you currently have by typing ipconfig /all

Let me know if this helps.

hasanatizaz 12-17-2008 09:25 AM

go to /etc/nsswitch.conf

in
hosts "files dns"
change to "dns files"

eco 12-17-2008 09:27 AM

Argh, so sorry. Can't read. Problem was with LAN not WAN.

All the same, you have DNS entries that didn't work so nothing's lost but still... sorry.

sandeepthug 12-17-2008 09:36 AM

thanks it worked

i just changed the dns on windows machines

thanks a lot once again


All times are GMT -5. The time now is 11:24 AM.