ufw
12
sudo ufw deny from <ip_range> port <port>
firewalld
sudo firewall-cmd --add-rich-rule='rule family="ipv4" source address="<ip_range>" port protocol="tcp" port="<port>" drop'