I am trying to block all connections to my pop3, imap server excepting my ip address and log dropped connections to a logfile
/etc/sysconfig/iptables
...
-N accept-n-log
-A accept-n-log -j LOG --log-level 4 --log-prefix "accept-n-log:"
-A accept-n-log -j ACCEPT
-N drop-n-log
-A drop-n-log -j LOG --log-level 4 --log-prefix "drop-n-log:"
-A drop-n-log -j DROP
-A INPUT -p tcp -m multiport --dports 110,143 -s m.y.i.p -j ACCEPT
-A INPUT -p tcp -m multiport --dports 110,143 -j DROP
...
After restarting iptables there is error coming up on line
[root@lax sysconfig]# iptables -N accept-n-log
[root@lax sysconfig]# iptables -A accept-n-log -j LOG --log-level 4 --log-prefix "accept-n-log:"
iptables: No chain/target/match by that name.
But I cannot find any reasons for this error.
My question is: Where is error in this line? Thanks!