How to manually ban IP with iptables

To manually ban IP with iptables, enter these commands :

iptables -A INPUT -s xx.xxx.xx.xx -j DROP

To ban 116.10.191.x ip mask :

sudo iptables -A INPUT -s 116.10.191.0/24 -j DROP

To ban 116.10.x.x ip mask :

sudo iptables -A INPUT -s 116.10.0.0/16 -j DROP

To ban 116.x.x.x ip mask :

sudo iptables -A INPUT -s 116.0.0.0/8 -j DROP

To check if the IP has been well banned :

iptables -L