UFW – Uncomplecated FireWall

it’s very easy to work with ufw

say we want to allow a port from everywhere
ufw allow 22/tcp

and allow a certain ip address
ufw allow from 192.168.1.10
or
ufw allow from 192.168.1.0/24

a certain port from certain IP
ufw allow from 192.168.1.10 port 8888

you can even set the protocol in there
ufw allow from 192.168.1.10 port 8888 proto tcp

it can be used for setting the destination.
ufw allow from 192.168.1.10 port 8888 proto tcp to 192.168.1.10 port 8888

a complete rule :
ufw allow from 192.168.1.10 port 8888 to 192.168.1.1 port 8888

Leave a Reply

Your email address will not be published. Required fields are marked *