LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Cannot Ping but can browse (https://www.linuxquestions.org/questions/linux-networking-3/cannot-ping-but-can-browse-564561/)

CyberEd 06-26-2007 05:55 AM

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.

SlackDaemon 06-26-2007 06:19 AM

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.

CyberEd 06-26-2007 10:53 PM

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.

Snowbat 06-26-2007 11:26 PM

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.

SlackDaemon 06-26-2007 11:32 PM

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

CyberEd 06-27-2007 12:36 AM

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.

SlackDaemon 06-27-2007 12:40 AM

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

CyberEd 06-27-2007 01:17 AM

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.

kssuhesh 10-26-2007 04:05 AM

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


All times are GMT -5. The time now is 06:49 AM.