UFW¶
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.
For more information, see: https://help.ubuntu.com/community/UFW
Enable UFW¶
To enable UFW with the default set of rules, run:
$ sudo ufw enable
To check the status of UFW:
$ sudo ufw status verbose
Example Rules¶
Allow VXLAN UDP/4789 from LAN Network¶
Let us assume that we have a LAN subnet 192.168.0.0/24 configured on eth0.10 (eth0 VLAN 10). We can define a specific rule to allow VXLAN (4789/udp) traffic from this network:
$ sudo ufw allow in on eth0.10 from 192.168.0.0/24 to any port 4789 proto udp
Deleting rules¶
To delete a rule, you can just specify delete
in the beginning of the command.
Let us try to delete the previously created rule as an example:
$ sudo ufw delete allow in on eth0.10 from 192.168.0.0/24 to any port 4789 proto udp