List entries with line numbers
iptables -L -v --line-numbers
iptables -D name_of_chain number_of_line_with_IP_that_you_want_to_delete
Let’s imagine that we want to unban 220.127.116.11! chain name is ‘f2b-sshd‘ and line number is 10!
iptables -D f2b-sshd 10
Ban entire subnet
Example (banning some chinese sh*t)
iptables -A INPUT -s 18.104.22.168/24 -j DROP iptables -A INPUT -s 22.214.171.124/24 -j DROP