To block 116.10.191.* addresses:
$ sudo iptables -A INPUT -s 22.214.171.124/24 -j DROP
To block 116.10.*.* addresses:
$ sudo iptables -A INPUT -s 126.96.36.199/16 -j DROP
To block 116.*.*.* addresses:
$ sudo iptables -A INPUT -s 188.8.131.52/8 -j DROP
But be careful what you block using this method. You don't want to prevent legitmate traffic from reaching the host.
edit: as pointed out, iptables evaluates rules in sequential order. Rules higher in the ruleset are applied before rules lower in the ruleset. So if there's a rule higher in your ruleset that allows said traffic, then appending (
iptables -A) the DROP rule will not produce the intended blocking result. In this case, insert (
iptables -I) the rule either:
sudo iptables -I ...
sudo iptables --line-numbers -vnL
say that shows rule number 3 allows ssh traffic and you want to block ssh for an ip range.
-I takes an argument of an integer that's the location in your ruleset you want the new rule to be inserted
iptables -I 2 ...