Removing a valid IP from IPTables or blacklisting a hacker IP

To remove a valid IP address from the iptables, log in via SSH and enter the following commands:

iptables-save > tmp_file

nano tmp_file

Remove / delete the line containing the valid IP address

iptables-restore < tmp_file & iptables-save

To block an IP (example 111.222.333.444), please use the following command:

iptables -A INPUT -s 111.222.333.444 -j DROP & iptables-save