UFW (Uncomplicated Firewall)
The Linux kernel provides a packet filtering system called netfilter. Netfilter is usually controlled by the iptables commands. Using iptables, you can manage Netfilter in a flexible way; however, iptables are not easy to use. UFW (Uncomplicated Firewall) is a frontend program for iptables that provides an easy-to-use user interface for people who are not familiar with firewall concepts.
Overview of UFW
There are six types of ufw
commands.
- Check UFW Status
- Enable and Disable UFW
- Default Policy Setting
- Allow or Deny Ports
- Allow or Deny IP Addresses
- Delete Policies
To run ufw
commands, you need the superuser privilege. For better operational efficiency, switch to the superuser for this section.
sudo su -
1. Check UFW Status
As a default setting, UFW is not enabled yet, although the ufw.service daemon process may be already running. Check UFW status by running the ufw status
command.
ufw status
Status: inactive
2. Enable and Disable UFW
To enable UFW, use the ufw enable
command. There will be an alert about ssh connection.
ufw
Subscribe now for
uninterrupted access.