LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 09-19-2007, 02:21 AM   #1
cnhawk386
LQ Newbie
 
Registered: Aug 2007
Posts: 25

Rep: Reputation: 15
why can't ping localhost


[root@wlxxb log]# ping localhost
ping: unknown host localhost
You have new mail in /var/spool/mail/root
[root@wlxxb log]# nslookup
> localhost
Server: 192.168.0.12
Address: 192.168.0.12#53

Name: localhost
Address: 127.0.0.1


why???
 
Old 09-19-2007, 02:33 AM   #2
ZAMO
Member
 
Registered: Mar 2007
Distribution: Redhat &CentOS
Posts: 598

Rep: Reputation: 30
Your Firewall may block this pinging to local. you can check this by typing iptables -L
 
Old 09-19-2007, 03:16 AM   #3
wimdh
LQ Newbie
 
Registered: Aug 2004
Location: Dendermonde, Belgium
Distribution: Ubuntu latest
Posts: 28

Rep: Reputation: 15
Can you ping 127.0.0.1?
 
Old 09-19-2007, 04:08 AM   #4
cnhawk386
LQ Newbie
 
Registered: Aug 2007
Posts: 25

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by ZAMO View Post
Your Firewall may block this pinging to local. you can check this by typing iptables -L
[root@wlxxb bin]# service iptables stop
....
[root@wlxxb bin]# ping localhost
]ping: unknown host localhost
 
Old 09-19-2007, 04:09 AM   #5
cnhawk386
LQ Newbie
 
Registered: Aug 2007
Posts: 25

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by wimdh View Post
Can you ping 127.0.0.1?

ping 127.0.0.1
PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.075 ms
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.064 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.052 ms
 
Old 09-19-2007, 06:07 AM   #6
soroccoheaven
Member
 
Registered: Jul 2007
Distribution: mandrake Mandriva Redhat CentOS Slackware
Posts: 221

Rep: Reputation: 30
it can be because of "self-address resolution problem" ..Otherwise, there may be a firewall between the two hosts or You can also have a problem because your host has multiple network interfaces connected to differents isolated networks. I think this can be due to "self-address resolution problem" with you.
so you need to check your /etc/hosts file ..should be somthing like this..
127.0.0.1 localhost.localdomain localhost

Thanks
 
  


Reply



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
Strange Ping Issue - Can't ping localhost but can ping others on LAN code_slinger Linux - Networking 15 03-30-2015 02:39 PM
Can't ping localhost (ping: sendto: Operation not permitted) mentor99us Linux - Networking 7 09-05-2012 02:11 PM
MDK 9.2, Can't ping localhost but can ping outside world? JohnLocke Linux - Networking 2 07-01-2004 05:59 PM
? on not being able to ping localhost eroica Linux - Networking 13 04-01-2004 03:58 PM
Can't ping localhost mandrakemark Linux - Networking 6 03-03-2004 08:57 PM

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

All times are GMT -5. The time now is 04:52 AM.

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