You can block an IP (12.12.12.12) from your server with the following command: # iptables -I INPUT -s 12.12.12.12 -j DROP You can remove it also via the following command: # iptables -D INPUT -s 12.12.12.12 -j DROP