For more secure server, we have to close some ports to users.

If need access to this ports, we can give permission to our IP address.  Please dont forget, “iptables” can be block all IP address but when you restart the server it will be clean all of this commands.


1. Closing FTP port except

iptables -t filter -I INPUT 1 -p tcp -s ! –dport 21 -j REJECT –reject-with icmp-host-prohibited

2. Closing SSH port except

Continue Reading…

Page 1 of 11