ping

Taking care of your Linux box.

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.
venky145
Havaldaar
 
Posts: 118
Joined: Thu Jan 13, 2005 2:35 pm
WLM: ranga72
Yahoo Messenger: venky145
Location: qatar

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"?
lambda
Major General
 
Posts: 3452
Joined: Tue May 27, 2003 7:04 pm
Website: http://www.hungry.com/~fn/
Location: Lahore

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
LinuxFreaK
Site Admin
 
Posts: 5132
Joined: Fri May 02, 2003 10:24 am
ICQ: 82075802
Website: http://www.linuxpakistan.net/wiki/index.php?pagename=LinuxFreak
WLM: f4fahmed@hotmail.com
Yahoo Messenger: f4fahmed@yahoo.com
AOL: linuxpakistan@aol.com
Location: Karachi

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
x2oxen
Major General
 
Posts: 1114
Joined: Wed Aug 22, 2007 3:17 pm
Website: http://usmanpk.com
WLM: x2oxen@hotmail.com
Yahoo Messenger: x2oxen
Location: Faisalabad

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

thanks a lot
MVS SUBRAMANYAM
SYSTEM ADMINISTRATOR
linuxcanchangeurlife
Cadet
 
Posts: 5
Joined: Mon Oct 27, 2008 10:18 am


Return to “%s” Administration

Who is online

Users browsing this forum: No registered users and 1 guest

cron