I am trying to set up this rule :
iptables -A INPUT -i eth1 -p tcp -s ! 10.111.11.0/24 --dport ssh --syn -m state --state NEW -j ACCEPT
but it doesnt work. When i change place of !
iptables -A INPUT -i eth1 -p tcp ! -s 10.111.11.0/24 --dport ssh --syn -m state --state NEW -j ACCEPT
its ok but i am not sure is it working correctly. In every tut on net "!" is between -s and ip not in front of it.