Thank you all for replies.
I've found a solution. The way it is installed and configured iptables
on Fedora 4 'hooks' a custom chain called 'RH-Firewall-1-INPUT' to the
INPUT and FORWARD. This chain does not work in my case so I have to
flush it. Basically, I could not see the input packets logged with
allow-ssh-in since my custom chain has not been invoked, all inputs
packets being consummed by the first mentioned chain. For my script to
work, I had to add four more lines:
iptables -F INPUT
iptables -F FORWARD
iptables -P INPUT DROP
iptables -P FORWARD DROP
(the OUTPUT chain is on ACCEPT by default).
Now I can remove the logs rules since I don't want to see packets
coming in and going out to 192.168.2.11 :-) anymore
Peter
(E-Mail Removed) wrote:
> I have just installed Fedora 4 (with iptables-1.3.0-2.i386) and got
> stuck with netfilter. I want to add a chain to allow another computer
> in my local network to connect to this server (ssh or else). Here is
> the content of the shell script I run to setup a new chains for that:
>
> iptables -N allow_ssh_in
> iptables -N allow_ssh_out
>
> iptables -A allow_ssh_in -s 192.168.2.11 -m state --state NEW -p tcp -j
> ACCEPT
> iptables -A allow_ssh_in -s 192.168.2.11 -m state --state
> ESTABLISHED,RELATED -p tcp -j ACCEPT
> iptables -A allow_ssh_in -m limit -j LOG --log-prefix "allow-ssh-in: "
>
> iptables -A allow_ssh_out -d 192.168.2.11 -m state --state NEW -p tcp
> -j ACCEPT
> iptables -A allow_ssh_out -d 192.168.2.11 -m state --state
> ESTABLISHED,RELATED -p tcp -j ACCEPT
> iptables -A allow_ssh_out -m limit -j LOG --log-prefix "allow-ssh-out:
> "
>
> iptables -A INPUT -j allow_ssh_in
> iptables -A OUTPUT -j allow_ssh_out
>
>
> Something is wrong though since when I try to connect from 192.168.2.11
> through ssh I get the log messages with packets from 'allow-ssh-out: ',
> and no connection is estabished. If I shut down iptables ($server
> iptables stop), the connection gets established no problem.
> Could anybody help me with this?
> Thank you
>
> Peter