LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-12-2009, 10:51 AM   #1
pjz
Member
 
Registered: Sep 2003
Posts: 71

Rep: Reputation: 15
Question DNS seems to work but can't ping out


Hi-

Weird problem. Looked through the similar posts, found one like it, but it was suggested that firewall is the problem. Tried turning off firewall, didn't fix problem.

Here it is...

Had DNS set up working fine. Firefox got onto the web A-0K. Took a power glitch, reset the system. Now Firefox can't find anything unless I give it explicit IP addresses.

So, suspecting DNS (and using Google as an example site), I type:

host google.com

and get...

google.com has address 74.125.95.106
google.com has address 74.125.95.147
google.com has address 74.125.95.99
google.com has address 74.125.95.103
google.com has address 74.125.95.104
google.com has address 74.125.95.105
google.com mail is handled by 10 google.com.s9a2.psmtp.com.
google.com mail is handled by 10 google.com.s9b1.psmtp.com.
google.com mail is handled by 10 google.com.s9b2.psmtp.com.
google.com mail is handled by 10 google.com.s9a1.psmtp.com.

Then, I try (from the screwed up machine)...

ping google.com

And I get...

ping: unknown host google.com

...whereas if I try this on a different (un-screwed-up) computer, I get...

PING google.com (64.233.169.99) 56(84) bytes of data.
64 bytes from yo-in-f99.1e100.net (64.233.169.99): icmp_seq=1 ttl=243 time=31.9 ms
64 bytes from yo-in-f99.1e100.net (64.233.169.99): icmp_seq=2 ttl=243 time=32.6 ms
64 bytes from yo-in-f99.1e100.net (64.233.169.99): icmp_seq=3 ttl=243 time=39.5 ms

At this point, I'm thinking it's not a Firefox problem.

Back onto my screwed up machine. I can do a dig to google, and that seems to work out okay...

; <<>> DiG 9.6.1b1-RedHat-9.6.1-0.3.b1.fc11 <<>> google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 1247
;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 4, ADDITIONAL: 0

;; QUESTION SECTION:
;google.com. IN A

;; ANSWER SECTION:
google.com. 112 IN A 74.125.95.105
google.com. 112 IN A 74.125.95.106
google.com. 112 IN A 74.125.95.147
google.com. 112 IN A 74.125.95.99
google.com. 112 IN A 74.125.95.103
google.com. 112 IN A 74.125.95.104

;; AUTHORITY SECTION:
google.com. 172611 IN NS ns3.google.com.
google.com. 172611 IN NS ns1.google.com.
google.com. 172611 IN NS ns2.google.com.
google.com. 172611 IN NS ns4.google.com.

;; Query time: 1 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Sat Dec 12 10:48:36 2009
;; MSG SIZE rcvd: 196

...obviously, nslookup works great, too. When I do a /etc/init.d/named status, I get this...

version: 9.6.1b1-RedHat-9.6.1-0.3.b1.fc11
CPUs found: 1
worker threads: 1
number of zones: 15
debug level: 0
xfers running: 0
xfers deferred: 0
soa queries in progress: 0
query logging is OFF
recursive clients: 0/0/1000
tcp clients: 0/100
server is up and running
named (pid 3495) is running...

... can't see anything in there to tip me off (maybe someone else can).

I'm wondering if one of the files that supports the DNS cache is fouled and that's what's screwing me up, but can't seem to find a really good explanation for DNS that doesn't take me a week to unravel. I'd be content to simply uninstall and re-install, but I'm not sure what to re-install.

Can anybody out there help? I'd rather not, but I may have to wipe my machine and re-install. Yuk! ...but, I'll do what I have to do.

Thanks in advance
pjz
 
Old 12-12-2009, 11:04 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
It's not a bind problem, as you can resolve domains successfully.
Check /etc/nsswitch.conf and see if you have dns in the hosts line:
Code:
hosts:    files dns
Regards
 
Old 12-13-2009, 09:21 PM   #3
pjz
Member
 
Registered: Sep 2003
Posts: 71

Original Poster
Rep: Reputation: 15
Bathory-

Thank you for your prompt reply.

I have checked my /etc/nsswitch.conf, and I do have the entry "hosts: files dns"

pjz
 
Old 12-14-2009, 01:18 AM   #4
targettl
Member
 
Registered: Sep 2009
Location: Launceston
Distribution: Kubuntu
Posts: 84

Rep: Reputation: 16
No idea, if dig works so should ping in theory.
 
Old 12-14-2009, 03:46 AM   #5
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
@OP

What's in /etc/resol.conf?
 
Old 12-14-2009, 11:01 AM   #6
pjz
Member
 
Registered: Sep 2003
Posts: 71

Original Poster
Rep: Reputation: 15
Bathory-

Fixed resolv.conf to match a working machine. Everything is back to normal. Many thanks - this saved me days.

pjz
 
  


Reply

Tags
dns, named



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
DNS lookup doesn't work, ping, firefox will not work properly lovemov Linux - Networking 2 04-23-2009 02:30 PM
LAN/ADSL Router ping working but DNS ping fails R N Ghosh Linux - Networking 1 01-13-2006 07:44 AM
can't ping DNS wmburke Linux - Wireless Networking 7 06-08-2005 02:12 PM
Traceroute, Ping, Domain Name Server (DNS) Lookup, WHOIS, and DNS Records Lookup netoknet General 1 05-09-2005 03:43 AM
'ping -b' / ping <switch> doesn't work bmike1 Linux - Networking 2 01-10-2005 02:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration