LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 06-26-2007, 06:55 AM   #1
CyberEd
LQ Newbie
 
Registered: Jun 2003
Location: Cebu City, Philippines
Distribution: Red Hat 5.2, 7.0
Posts: 26

Rep: Reputation: 15
Cannot Ping but can browse


Hello everyone.
I have a Bayanihan Linux 4 (Philippine made version using Debian GNU/Linux) and my problem is that I could browse any internet website but I cannot successfully ping an IP. For example I could browse to www.yahoo.com but if want to ping that URL it won't proceed. It just stucks and does not continue if ping is successfull.

Any suggestion?

Thanks and God bless.
 
Old 06-26-2007, 07:19 AM   #2
SlackDaemon
Member
 
Registered: Mar 2006
Distribution: RedHat, Slackware, Experimenting with FreeBSD
Posts: 222

Rep: Reputation: 30
Your firewall is likely blocking ICMP echo requests/replies.

Try running nmap first as nmap -v then with nmap -v -P0.

The first of these tests should give you a negative result if ICMP is blocked, whereas the latter should return a positive for ports 80 and 443.
 
Old 06-26-2007, 11:53 PM   #3
CyberEd
LQ Newbie
 
Registered: Jun 2003
Location: Cebu City, Philippines
Distribution: Red Hat 5.2, 7.0
Posts: 26

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by SlackDaemon
Your firewall is likely blocking ICMP echo requests/replies.

Try running nmap first as nmap -v then with nmap -v -P0.

The first of these tests should give you a negative result if ICMP is blocked, whereas the latter should return a positive for ports 80 and 443.
Hello SlackDaemon.
Thanks for the response.
When i try to nmap our proxy server it says port 80 is open.
But when i try to nmap our gateway server it says port 80 is filtered.

Does this problem have to do with firewalls?
If so. Is it my local firewall that disallows pings or is it our
LAN firewall that disallows pings.

If it is my local firewall where could i change it?
Im a newbie by the way..hehehe

Kindly help.

Thanks again and God bless.
 
Old 06-27-2007, 12:26 AM   #4
Snowbat
Member
 
Registered: Jun 2005
Location: q3dm7
Distribution: Mandriva 2010.0 x86_64
Posts: 338

Rep: Reputation: 31
You can use traceroute with the -I option to see how far along the route your ICMP Echo Request/ICMP Echo Reply is working. Use again without the -I option and by comparing the output of both, you should be able to see where the blocking occurs.

If your internet access is only through a proxy server (ie. no direct or NATted route), you won't be able to ping outside your LAN.

Also keep in mind that some networks and sites block incoming ICMP Echo Request packets on their end (eg. www.microsoft.com) but www.yahoo.com (at least the alias I currently see here at www.yahoo-ht3.akadns.net (69.147.114.210)) is pingable.
 
Old 06-27-2007, 12:32 AM   #5
SlackDaemon
Member
 
Registered: Mar 2006
Distribution: RedHat, Slackware, Experimenting with FreeBSD
Posts: 222

Rep: Reputation: 30
The nmap test I mentioned, were meant to be used on a host outside your network.

I doubt its your local PCs firewall. Have you tried pings from any other PCs on your LAN?

More likely its your network's gateway/firewall. Is your network's firewall a Linux or hardware based? Either way you'll need to ask your administrator to allow ICMP echo requests/replies.

If your LAN firewall is a linux, the commands to allow these would be:

iptables -I FORWARD -m icmp -p icmp --icmp-type echo-request -j ACCEPT
iptables -I FORWARD -m icmp -p icmp --icmp-type echo-reply -j ACCEPT
 
Old 06-27-2007, 01:36 AM   #6
CyberEd
LQ Newbie
 
Registered: Jun 2003
Location: Cebu City, Philippines
Distribution: Red Hat 5.2, 7.0
Posts: 26

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Snowbat
You can use traceroute with the -I option to see how far along the route your ICMP Echo Request/ICMP Echo Reply is working. Use again without the -I option and by comparing the output of both, you should be able to see where the blocking occurs.

If your internet access is only through a proxy server (ie. no direct or NATted route), you won't be able to ping outside your LAN.

Also keep in mind that some networks and sites block incoming ICMP Echo Request packets on their end (eg. www.microsoft.com) but www.yahoo.com (at least the alias I currently see here at www.yahoo-ht3.akadns.net (69.147.114.210)) is pingable.
I tried the traceroute -l but only give all * * * (asteribks).
By the way I could ping from my other computer which run on windows.
I could also ping inside a Linux emulator (i.e. Cygwin) on windows on other computer.

Any other possible solution?

Thanks and God bless.
 
Old 06-27-2007, 01:40 AM   #7
SlackDaemon
Member
 
Registered: Mar 2006
Distribution: RedHat, Slackware, Experimenting with FreeBSD
Posts: 222

Rep: Reputation: 30
Quote:
Originally Posted by CyberEd
I tried the traceroute -l but only give all * * * (asteribks).
By the way I could ping from my other computer which run on windows.
I could also ping inside a Linux emulator (i.e. Cygwin) on windows on other computer.

Any other possible solution?

Thanks and God bless.

Your PCs firewall might be bocking incoming echo replies. Add the rules I mentioned before, but instead of the FORWARD chain, add them to your INPUT chain.

iptables -I INPUT -m icmp -p icmp --icmp-type echo-request -j ACCEPT
iptables -I INPUT -m icmp -p icmp --icmp-type echo-reply -j ACCEPT
 
Old 06-27-2007, 02:17 AM   #8
CyberEd
LQ Newbie
 
Registered: Jun 2003
Location: Cebu City, Philippines
Distribution: Red Hat 5.2, 7.0
Posts: 26

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by SlackDaemon
Your PCs firewall might be bocking incoming echo replies. Add the rules I mentioned before, but instead of the FORWARD chain, add them to your INPUT chain.

iptables -I INPUT -m icmp -p icmp --icmp-type echo-request -j ACCEPT
iptables -I INPUT -m icmp -p icmp --icmp-type echo-reply -j ACCEPT
Hello SlackDaemon.
Yes its my local PC firewall thats blocking my ping.
So disable it using the guardog firewall of KDE.

Thanks for your help. It is very much appreciated.

God bless.
 
Old 10-26-2007, 05:05 AM   #9
kssuhesh
LQ Newbie
 
Registered: Aug 2007
Location: Kochi
Distribution: Mandriva
Posts: 23

Rep: Reputation: 15
Cannot Ping but can browse
I also has the same problem
Ping cannot working through the proxy server but can browse the internet. I am using the Freebsd 5.4 as the proxy server when I am trying to ping through the proxy as gateway there is no response. When I try traceroute it ends in the proxy server. I am using the DSL modem for internet.

==========
In rc.conf I put

gateway_enable="YES"

==============
I think ipforwarding is not enabled in the server. Is any one help me for solving this problem.
Is there any more configuration setting for ipforwarding.

Thank U
Sks

Last edited by kssuhesh; 10-26-2007 at 05:08 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 browse, Can't ping! cyent Linux - Networking 2 05-11-2004 07:41 PM
can't browse internet but can ping cj7_laredo Fedora 3 01-21-2004 11:43 PM
HELP!! can ping but cant browse fooforon Linux - Networking 5 09-03-2003 09:52 PM
Can ping but cannot browse placeb0 Linux - Networking 2 08-29-2003 07:16 AM
can ping dns but not browse N_A_J_M Linux - General 6 03-10-2003 03:50 AM


All times are GMT -5. The time now is 05:26 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration