ping

Taking care of your Linux box.
venky145
Havaldaar
Posts: 118
Joined: Thu Jan 13, 2005 2:35 pm
Location: qatar
Contact:

ping

Postby venky145 » Tue Nov 25, 2008 11:56 am

hi

I blocked ICMP port like this way

echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all

but my problem is my WAN ip also blocked the ping. Now i want to block my internal ping only not external ping i mean I want to allow WAN IP PING.

How can i do that.

lambda
Major General
Posts: 3452
Joined: Tue May 27, 2003 7:04 pm
Location: Lahore
Contact:

Postby lambda » Tue Nov 25, 2008 12:18 pm

use an appropriate iptables rule.

by the way, dropping all icmp packets just to block ping is a really, really bad idea.
Watch out for the Manners Taliban!
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?

LinuxFreaK
Site Admin
Posts: 5132
Joined: Fri May 02, 2003 10:24 am
Location: Karachi
Contact:

Re:

Postby LinuxFreaK » Wed Nov 26, 2008 12:11 pm

Dear venky145,
Salam,

You can just block echo requests.

iptables -A INPUT -p icmp --icmp-type echo-request -j DROP

Best Regards.
Farrukh Ahmed

x2oxen
Major General
Posts: 1114
Joined: Wed Aug 22, 2007 3:17 pm
Location: Faisalabad
Contact:

Postby x2oxen » Fri Nov 28, 2008 1:10 pm

Dear Farrukh that command will block his icmp request on all interfaces as well.


iptables -A INPUT -p icmp -i BlockInterface --icmp-type echo-request -j DROP
Muhammad Usman
+92-321-6640501
Chemonics International
http://usmanpk.com

linuxcanchangeurlife
Cadet
Posts: 5
Joined: Mon Oct 27, 2008 10:18 am

Postby linuxcanchangeurlife » Fri Dec 05, 2008 12:01 pm

thanks a lot
MVS SUBRAMANYAM
SYSTEM ADMINISTRATOR


Return to “Administration”

Who is online

Users browsing this forum: No registered users and 1 guest