iptables No chain target match by name [closed]
Solution 1:
Look, Alessandro, you told us you typed iptables -A INPUT
but when - after much prodding - you finally cut-and-pasted it, it turns out you're typing iptables -A input
. These are not the same thing. iptables
- like much of UNIX - is case-sensitive.
Try using iptables -A INPUT -p tcp --dport 21 -j DROP
and it should work much better.
In addition, this rule you're adding will do nothing, because it will never see ftp traffic. This has already been permitted by rule 3 in chain net2fw
. If you want to block incoming ftp connections, you'll need to do iptables -D net2fw 3
instead.