Iptables :: priority of rules
Luc MAIGNAN
luc.maignan at winxpert.com
Fri Feb 23 10:26:44 UTC 2007
Hi all,
I don't understand how the priority of the rules of iptables is set.
My problem : I want to allow ssh from my local network(1), and from
outside only for an IP(2)
So i Wrote :
(1) : iptables -I INPUT -p tcp -s 192.168.0.0/24 --dport ssh -j ACCEPT
(2) : iptables -I INPUT -p tcp -s ! x.x.x.x --dport ssh -j DROP
The result is that I can ssh only from the ousided IP, not from local
network. If I switch the two rules, the result is the same.
Can anyone help me to understand ?
BR
--
More information about the fedora-list
mailing list