Are you sure the rules are even actives? Are you using any other iptables rules Did you receive any error messages?
Run this to see if your rules are even being matched:
Are there number is the pkts and bytes columns, or are they 0 ?
These should be sufficient to block those services:
Code:
iptables -A INPUT -p tcp -m tcp --dport 23 -j DROP
iptables -A INPUT -p tcp -m tcp --dport 21 -j DROP
To be more secure, you should drop/reject by default, and then only allow the services you need. More details about the network and what/why you need to block those particular services would be helpful.
Bookmarks