To block PING on the RED interface of IPCop I have modified /etc/rc.d/rc.firewall as follows:
OLD:
# Allow ICMP echo-request (ping), all other essential ICMP will be # ESTABLISHED or RELATED, and the rest caught by the default DENY policy /sbin/iptables -A INPUT -p icmp --icmp-type 8 -j ACCEPT
NEW:
# Allow ICMP echo-request (ping), all other essential ICMP will be # ESTABLISHED or RELATED, and the rest caught by the default DENY policy if [ "$IFACE" != "" ]; then # RED PING /sbin/iptables -A INPUT -p icmp --icmp-type 8 -i $IFACE -j DROP fi /sbin/iptables -A INPUT -p icmp --icmp-type 8 -j ACCEPT
Where $IFACE is the device connected to the internet (ppp0 on my DSL system). It appears to be working correctly and I can still ping other addresses.
Is the above change the sensible way to do it or should I have added the code to the iptables_red() funtion instead ? The problem I see is that when the red interface is stopped or started then only iptables_red() is called during "rc.firewall reload".
Will it break something if that rule is left in the INPUT chain although the ppp0 interface is down ?
Thanks for any insight you may have on this matter.
Bill