PDA

View Full Version : Block pings on a VPS


elix
08-08-2006, 07:37 PM
I know SL wanted this before, so I might as well post this here:

To disable incoming ICMP:

iptables -t filter -A INPUT -p icmp --icmp-type 8 -j DROP

To enable incoming ICMP:

iptables -t filter -D INPUT -p icmp --icmp-type 8 -j DROP

I've tested this, and it works fine from what I can see...

SludgeMeister
08-08-2006, 07:48 PM
Thank you Elix.

elix
08-08-2006, 08:55 PM
No problem. Please note that I do not recommend blocking ICMP, as that would actually be disobeying an RFC (if you search on Google you'll find many posts on lists like NANOG about ISPs who do this and it's frowned upon there)....but someone seriously stoops down so low to start flooding your VPS / server with pings then this is one of the only ways to stop them...(though i'm sure there's a better way to do it...and i'm still looking for it...)

SlAiD
08-09-2006, 01:16 PM
(quoting WWE, DX):

I've only two words for you...


http://img325.imageshack.us/img325/827/thank2520youaj2.jpg


THANK YOU! :D


SL

elix
08-09-2006, 03:00 PM
(quoting WWE, DX):

I've only two words for you...


http://img325.imageshack.us/img325/827/thank2520youaj2.jpg


THANK YOU! :D


SL
Your welcome :)