LinuxQuestions.org
Help answer threads with 0 replies.
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-15-2003, 09:37 AM   #1
code_slinger
LQ Newbie
 
Registered: Sep 2003
Location: Texas
Distribution: Mandrake 9.1
Posts: 8

Rep: Reputation: 0
Question Strange Ping Issue - Can't ping localhost but can ping others on LAN


Greetings and thanks in advance for any help. Last night, I installed Mandrake 9.1 and am having a strange issue. I set the linux machine to get its IP address from my router's DHCP server. I set the router up so that it always hands the same IP address to the linux machine. Now the linux machine gets the IP address from the router and I can browse the internet and ping any of the windows machines that I have on the network using their IP address. Having setup Apache and proftpd, I can go to a windows box and http or ftp to the linux machine, but I can't ping it. From the linux machine, I can verify that it has the IP number that I wanted it to get from the DHCP server, I can browse the internet and ping the other boxes, but I can't get a response from pinging localhost, 127.0.0.1, or the IP that I know its using from the DHCP server. Any suggestions or pointers?

Thanks,
Dave
 
Old 09-15-2003, 10:46 AM   #2
Eqwatz
Member
 
Registered: May 2003
Distribution: Slack Puppy Debian DSL--at the moment.
Posts: 341

Rep: Reputation: 30
First) Are you using the router for the default_gateway for every computer on the private network (called a sub-net)?
No matter what, every machine has to have a default_gateway set up on it. Either the router or an address for the linux box.

Second) Is every machine on your subnet assigned a unique name? Including the linux box!
I think the windows login defaults to the owner's name, you need to set the computer's network identification (name) in a "network properties" window.

Third) Did you set-up a local domain name in the router for the subnet? And set all of the machines to be a part of it?

Fourth) You need to check the "Hosts" file in each machine. Tcp-ip defaults to checking that first. And/or respective ipconfig commands on each box.

[Once an IP address is assigned to <unique_name_for_each_host/computer> I don't think you can ping "localhost local_domain" from the outside. It is reserved for internal communication. You may be able to ping it from the same_host--then it is using the loop-back.]

Hope that gave you ideas on where to look. (I know. The post was still too long.)

Last edited by Eqwatz; 09-15-2003 at 01:13 PM.
 
Old 09-15-2003, 05:42 PM   #3
steely
Member
 
Registered: Aug 2003
Location: Houston TX
Distribution: Ubuntu
Posts: 37

Rep: Reputation: 15
Do you have a firewall running?
 
Old 09-16-2003, 09:33 AM   #4
code_slinger
LQ Newbie
 
Registered: Sep 2003
Location: Texas
Distribution: Mandrake 9.1
Posts: 8

Original Poster
Rep: Reputation: 0
Only firewall running on the network is the one on the router/cable modem. Thanks again for any ideas/suggestions. I'm going to work on it again tonite since I've been studying for the first round of exams this semester.
 
Old 09-16-2003, 10:08 PM   #5
Moltag
Member
 
Registered: Jul 2003
Location: 'Flori-duh,' US
Distribution: Slackware 9, RH 9
Posts: 33

Rep: Reputation: 15
It sounds to me like Mandrake uses some iptables rulesets right out of the box, as Red Hat does, giving your box a limited firewall. You could try flushing iptables' rule chains and see if that fixes your problem. Open a terminal, type...

iptables -F INPUT

...and then try pinging your linux box from your other hosts and via localhost. I don't know why, but it's possible 'Drake's default rulesets are blocking your ICMP packets and nothing else. It sounds silly, yes, but we've pretty much ruled out plain ol' connectivity failure, since your box was able to communicate via HTTP and FTP.

Anyway, if the above command fixes the problem, then be sure to read up on the 'Drake documentation to figure out how to turn the thing off for good.
 
Old 09-17-2003, 08:55 AM   #6
code_slinger
LQ Newbie
 
Registered: Sep 2003
Location: Texas
Distribution: Mandrake 9.1
Posts: 8

Original Poster
Rep: Reputation: 0
The router on the network is also a dhcp server, and yes every other computer on the network pipes through it as a gateway to the internet. Every computer on the network has a unique name, including the linux box. I did setup a local domain name on the router, which all computers are using. I know this isn't a problem with the host files on the other computers, since I'm trying to ping using the IP address that I know the linux machine is using rather than the name of that computer. Also can't ping localhost from the linux computer. Tried the "iptables -F INPUT" command then pinging, but got the same non-response. Any more suggestions?

Thanks again,
dave
 
Old 09-17-2003, 01:05 PM   #7
voltron1011
Member
 
Registered: Aug 2003
Location: Tucson, AZ
Distribution: Red Hat 8
Posts: 62

Rep: Reputation: 15
Is your loop-back interface up? I read somewhere that many times linux has this disabled because most 'users' don't use it. check /etc/sysconfig/network-scripts/ and see if you can see the lo interface...
 
Old 09-17-2003, 02:29 PM   #8
code_slinger
LQ Newbie
 
Registered: Sep 2003
Location: Texas
Distribution: Mandrake 9.1
Posts: 8

Original Poster
Rep: Reputation: 0
I'm not at home at the moment so I can't check the /network-scripts/, but I do remember seeing lo listed under the ethernet interfaces list somewhere in the gui along with eth0 while working on my setup. So I'm pretty sure its there.
 
Old 09-17-2003, 07:56 PM   #9
code_slinger
LQ Newbie
 
Registered: Sep 2003
Location: Texas
Distribution: Mandrake 9.1
Posts: 8

Original Poster
Rep: Reputation: 0
I checked and lo is in there. I tried 'ifconfig lo' and it shows it as having a huge amount of errors. Investigating further...
 
Old 09-18-2003, 11:08 PM   #10
code_slinger
LQ Newbie
 
Registered: Sep 2003
Location: Texas
Distribution: Mandrake 9.1
Posts: 8

Original Poster
Rep: Reputation: 0
Woot! Figured it out finally. The problem was in /etc/sysctl.conf

I changed the line that read:
net.ipv4.icmp_echo_ignore_all=1
to:
net.ipv4.icmp_echo_ignore_all=0

and it now lets me ping localhost from the linux box and to ping the known ip from the windows box.
 
Old 09-20-2003, 01:12 PM   #11
LGMike
LQ Newbie
 
Registered: Sep 2003
Location: USA
Distribution: Mandrake
Posts: 22

Rep: Reputation: 15
unless you're troubleshooting something, you typically want that setting on! it helps to make your computer more "stealthy" (better security) ;-) --not being able to ping your computer is really not that big a deal unless you're having other connection problems. it's main purpose is to test network layers physical through networking, so it's really just a troubleshooting tool
 
Old 09-20-2003, 07:02 PM   #12
code_slinger
LQ Newbie
 
Registered: Sep 2003
Location: Texas
Distribution: Mandrake 9.1
Posts: 8

Original Poster
Rep: Reputation: 0
good point. Not too worried now that I know its not a network problem. One of the reasons I like using linux is because its like a puzzle, rather than a point and click thing. I have the linux box setup on my network without any mouse, keyboard, or monitor. Just a network cable and a power cord. Now I'm having fun trying to figure out how to make my users accounts have there own http://ipaddress.whatever/~user/ pages work with apache's UserDir directive. Have it mostly figured out but msec keeps rewriting my permissions for the /home/user/public_html path. I'll play with it somemore then post to a thread for help. heheh. Also trying to figure out a good way to startx from a ssh connection....fun fun fun.
 
Old 09-21-2003, 01:31 AM   #13
LGMike
LQ Newbie
 
Registered: Sep 2003
Location: USA
Distribution: Mandrake
Posts: 22

Rep: Reputation: 15
yup! thats Linux!
it's always kinda cool trying to figure things out on your own, but you can use up many many hrs messing around on Linux!
Good luck in your many Linuxian endeavors!!!
 
Old 03-17-2011, 02:47 AM   #14
s.ali
LQ Newbie
 
Registered: Mar 2011
Posts: 1

Rep: Reputation: 0
Lightbulb hostname not pinging in REDHAT

Hi,
Prob.:-hostname was not pinging in REDHAT 5.5
sol.:-I just change the hostname in system> administrator> Network>DNS>hostname.
I found hostname is localhost.
After that i am able to ping localhost.

Thanks
 
Old 03-29-2015, 10:10 PM   #15
Sam_Sheriff
LQ Newbie
 
Registered: Mar 2015
Posts: 1

Rep: Reputation: Disabled
Hi Folks,

I know question about SSH and startx goes back to almost 12-13 years ago; but still there maybe people ending up reading it here (like myself) and want to know the answer right away
so the parameter to be passed to command ssh is -Y and below is an example :

Code:
ssh -Y oracle@db-rh65-qa.example.net
I used it with X-Windows myself so am not quite sure if/how it'd work elsewhere.


Cheers,
Sam

Last edited by Sam_Sheriff; 03-29-2015 at 10:14 PM.
 
  


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
Can't ping localhost (ping: sendto: Operation not permitted) mentor99us Linux - Networking 7 09-05-2012 02:11 PM
Any idea why this time I can not ping my LAN pc but can PING for ex. www.yahoo.com vakia Debian 5 09-28-2005 06:42 PM
Can't ping with XP, can't ping localhost bozoka45 Mandriva 4 06-13-2005 04:23 AM
can't connect to linux box on lan, or ping localhost banschu Linux - Networking 2 09-01-2004 10:16 PM
MDK 9.2, Can't ping localhost but can ping outside world? JohnLocke Linux - Networking 2 07-01-2004 05:59 PM

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

All times are GMT -5. The time now is 06:50 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