newbie question (LOG problem)D
Fri, 25 Jan 2002 13:26:01 +0100 (CET)
>According to you is there something wrong?
>if [ "$1" = "start" ]
> echo "Starting firewall ......"
> iptables -P INPUT DROP
> iptables -A INPUT -j ACCEPT
> iptables -A INPUT -m state --state ESTABLISHED, RELATED -j
> iptables -A INPUT -j LOG --log-prefix 'bad input:'
>elif [ "$1" = "stop" ]
> echo "Stopping firewall ....."
> iptables -F INPUT
> iptables -P INPUT ACCEPT
Are these all of your rules? Your default policy for INPUT is DROP, but
with iptables -A INPUT -j ACCEPT you accept all input connections! After
that, the processing of your INPUT chain stops, because the first rule
maches. The LOG rule will never match. Remeber: The first rule that
matches ends the processing of a chain, except a LOG rule. So, if you want
to log INPUT packets, put the LOG rule before the ACCEPT rule (are you
sure you want to accept everything?)