Block an IP Use a real IPv4 instead of x.x.x.x This will add the block rule to the beginning of the list moving (not overwriting) everything else down. sudo /sbin/iptables -I INPUT 1 -s x.x.x.x -j DROP