Block IP subnet or range using iptables

How to use iptables to block a range of IP addresses

To drop a range such as 1.2.3.0 to 1.2.3.255 use:
sudo iptables -A INPUT -s 1.2.3.0/24

To drop a larger range of IPs such as 1.2.0.0 to 1.2.255.255 use:
sudo iptables -A INPUT -s 1.2.0.0/16

For a cheatsheet of subnet ranges see:
https://www.aelius.com/njh/subnet_sheet.html