Tuesday, August 12, 2014

Block connection from foreign IPs using iptables

To block foreign IPs but allow IPs from where you want, I used a shell script to control rules in iptables. I take Taiwan for example and below is the shell script (download):

Detect IP conflict using nmap


Here is a terrible trouble happened on our new server: unstable SSH connection. Here I want to share how I find and "shoot" the trouble.