ping www.google.co.in gives unknown host error ,ping to LAN address works fine
even ping google's ip address doesn't work. unknown host error
using backtrack4 able to browse net with these settings. my network settings: /etc/networking/interfaces -------------------------- auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 10.0.0.54 netmask 255.255.252.0 network 10.0.0.0 broadcast 10.0.3.255 gateway 10.0.0.254 -------------------------- /etc/resolv.conf nameserver 202.141.81.2 nameserver 202.141.80.9 (note ping to DNS 202.141.81.2 works fine) ----------------- /etc/nsswitch.conf passwd: compat group: compat shadow: compat hosts: files dns networks: files protocols: db files services: db files ethers: db files rpc: db files netgroup: nis ------------------------ /etc/hosts 127.0.0.1 localhost 127.0.1.1 backtrack bt -------------------------- /etc/host.conf order hosts,bind multi on --------------------- please explain what's the problem with these settings... |
OK, so your first comment is wonky...
Quote:
|
pinging an IP address will not get you a "host unknown" error that I know of.
you can use 'dig' or 'nslookup' to test your DNS configuration. if you can ping 8.8.8.8 (google dns) and not www.google.com then you are having DNS problems. If you are able to ping internal addresses, and not external addresses, it might also be your default route. use 'route' to verify. |
@acid_kewpie: ok... my bad. actually i am not able to ping external addresses.
output of dig www.google.com@202.141.81.2 ; <<>> DiG 9.5.0-P2.1 <<>> www.google.com@202.141.81.2 ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 34420 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;www.google.com\@202.141.81.2. IN A ;; Query time: 9 msec ;; SERVER: 202.141.81.2#53(202.141.81.2) ;; WHEN: Thu May 12 16:43:43 2011 ;; MSG SIZE rcvd: 45 @szboardstretcher: not able to ping 8.8.8.8 either nslookup gives ;; Got SERVFAIL reply from 202.141.81.2, trying next server ;; connection timed out; no servers could be reached route gives Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 10.0.0.0 * 255.255.252.0 U 0 0 0 eth0 default 10.0.0.254 0.0.0.0 UG 100 0 0 eth0 |
You typed the dig command wrong. There is a space before the @.
|
ok.. output of "dig www.google.com @202.141.81.2"
; <<>> DiG 9.5.0-P2.1 <<>> www.google.com @202.141.81.2 ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 26157 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;www.google.com. IN A ;; Query time: 11 msec ;; SERVER: 202.141.81.2#53(202.141.81.2) ;; WHEN: Fri May 13 03:40:38 2011 ;; MSG SIZE rcvd: 32 seems space before '@' doesn't matter since output is same except line ";www.google.com\@202.141.81.2. IN A" |
of course it matters, it makes the command work differently. If you don't understand what the command is even doing I'd suggest you don't question it.
Your DNS can't resolve google.com, so fix your DNS server. |
Thanks for all the replies.
I am still not able to sort out the DNS problem. what should be done ? |
you need to make the DNS server resolve the name, or use a different DNS server. What other solution are you expecting??
|
I think iptables blocks my ping requests. As this DNS server is not setup on my machine I can't exactly pin point the problem .But Yes I have tested it on my own LAN setup with one machine as dns and other as client and got the same error when tried to resolve domain name from client machine.Trying to figure out the problem, I found iptables was blocking my requests from other machines.After fixing it, now everything works fine.
Thanks acid_kewpie for all the responses and help. |
Quote:
|
All times are GMT -5. The time now is 07:48 PM. |