Denegar Ping con Iptables
Si queremos denegar el ping en algun interfaz de red con iptables tenemos que pasarle los siguientes parametros, para ello podemos crear un script con el siguiente contenido:
#/bin/bash
iptables -A INPUT -i eth0 -p icmp –icmp-type destination-unreachable -j ACCEPT
iptables -A INPUT -i eth0 -p icmp –icmp-type time-exceeded -j ACCEPT
iptables -A INPUT -i eth0 -p icmp –icmp-type echo-reply -j ACCEPT
iptables -A INPUT -i eth0 -p icmp -j DROP
Tambien podemos eliminar el -i eth0 y bloquear el ping en todas las interfaces de red.
Otra forma de hacerlo es poner el valor “icmp_echo_ignore_all” a 1 , para ello puedes utilizar el siguiente comando:
echo “1″ > /proc/sys/net/ipv4/icmp_echo_ignore_all
Informacion obtenida de unixmexico.org
2007
23
Mar
- Posted by tru3n0 at 08:01 pm
- Permalink for this entry
- Filed under: Linux, Seguridad
- RSS comments feed of this entry
- TrackBack URI
No comments
Leave a comment