How to use UFW
NOTE: UFW is not the firewall. UFW just configures your iptablesSome basic commands are:
Turn on the firewall
ufw enable
Turn off the firewall
ufw disable
To add deny rules:
Blocking a port
ufw deny port <port number>
Blocking an ip address
ufw deny from <ip address>
Blocking a specific ip address and port
ufw deny from <ipaddress> to port <port number>
To add allow rules:
Allow an ip address
ufw allow from <ip address>
ufw <port number>
Allow a specific ip address and port
ufw allow from <ipaddress> to any port <port number>
To remove a deny or allow rule
ufw delete <rule type> from <ip address> to any port <port number>
Article Details
Last Updated
26th of April, 2010
Related Articles
No related articles were found.
Attachments
No attachments were found.


