Ubuntu – ufw
The default firewall configuration tool for Ubuntu is
ufw and if you’re running a dedicated Linux server, you should have access to it.
To allow an IP range through ufw, enter the following into your terminal:
$ sudo ufw allow from 192.168.211.0/24
And if you wish to restrict connections from a range to a specific TCP network port:
$ sudo ufw allow from 192.168.211.0/24 to any port 22 proto tcp
You can read more about ufw here.
CentOS – firewalld
With CentOS, you can use
firewalld which works in a very similar way. to Ubuntu’s
ufw. To whitelist an IP range, run the following command in your terminal:
$ sudo firewall-cmd --zone=public --add-source=192.168.211.0/24
You can find more information about firewalld here