Click to See Complete Forum and Search --> : Ipchains question
linuxluis
01-25-2002, 07:43 PM
Hello all,
I was wondering if anyone could help me out. I would like to block all ping to my machine that people do .
How would I do this?
Is it threw ipchains or some file that I have to edit.
Thank you. ;-)
J-Tek
01-25-2002, 09:33 PM
Well,
Im not too sure about ipchains but in iptables you can drop all pings this way.
iptables -A INPUT -p ICMP -j DROP
If someone pings you, nothing registers so it's like nothing's there.
Well, the echo has two different icmp ports. 0 is an echo-reply and 8 is a echo-request. So if you want to block all pings, you need to block or deny these addresses.
Example (can't test if they work properly)
"ipchains -A output -i $EXT_IF -p icmp -s $MY_IP 0 -d $ANY -j DENY"
"ipchains -A input -i $EXT_IF -p imcp -s $ANY -d $MY_IP 8 -j DENY"
$EXT_IF is your external interface. $MY_IP is your ip address. $ANY is anywhere (0.0.0.0).
However i suggest you base your firewall policy on deny on anything except accepted traffics, much more secure than plug few things and accept everything else.
[ 26 January 2002: Message edited by: Hena ]