linux poison RSS
linux poison Email

ufw (Uncomplicated Firewall) setup and configuration in Ubuntu

The default firewall configuration tool for Ubuntu is ufw. Developed to ease iptables firewall configuration, ufw provides a user friendly way to create an IPv4 or IPv6 host-based firewall.

The following are some examples of how to use ufw:

First, ufw needs to be enabled. From a terminal prompt enter: sudo ufw enable
To open a port (ssh in this example): sudo ufw allow 22
Similarly, to close an opened port: sudo ufw deny 22
To remove a rule, use delete followed by the rule: sudo ufw delete deny 22
ufw can be disabled by: sudo ufw disable

It is also possible to allow access from specific hosts or networks to a port. The following example allows ssh access from host to any ip address on this host:

sudo ufw allow proto tcp from to any port 22


Anonymous said...

thanks! helped with huge logs

Post a Comment

Related Posts with Thumbnails