Ubuntu Firewall

How to Enable and Disable UFW Ubuntu Firewall

In This Tutorial We are Going to Learn How to Enable and Disable UFW Ubuntu Firewall. The UFW Firewall is installed by default on Ubuntu Linux, but by default it is disabled.

It is very easy to enable the ufw using ufw enable command, But before we enable the firewall we need to make sure we also add a firewall rule to allow ssh connection to our Ubuntu Server. Otherwise, you will be locked out of your server.

How to Check Firewall Status in Ubuntu Firewall

In This tutorial we are going to learn how to check the firewall status in Ubuntu UFW.

To check firewall status use the ufw status command in the terminal.

sudo ufw status

If the firewall is enabled, you will see the list of firewall rules and the status as active. If the firewall is disabled, you will get the message “Status: inactive”.

How to Change Default Firewall Policy on UFW Ubuntu Firewall

In This Tutorial We are going to learn how to change the default Firewall Policy on Ubuntu Firewall UFW. By default UFW Default Policies are Deny incoming traffic Allow outgoing traffic View UFW Default Policy We can find the default firewall policy on our Ubuntu server using ufw status command. ufw status verbose | grep

How to Open a Port in Ubuntu Firewall

In This UFW Tutorial We are going to Learn How to open a port in Ubuntu Firewall.

Ufw allow command use to open port in Ubuntu Firewall. By default, if you did not specify the protocol, the port will open for both TCP and UDP protocols.

How to Block Ports in UFW Ubuntu Firewall

In This tutorial we are going to learn how to block network ports in Ubuntu using UFW Firewall.

To block a port in UFW we use ufw deny command

ufw deny port/protocol

How to Allow IP Address in Ubuntu Firewall

In This UFW Tutorial we are going to learn how to allow IP Address from Ubuntu Firewall.

In Ubuntu Firewall we can add rules to allow IP Address to All Traffic or for certain network ports using ufw allow command.

ufw allow from <Remote-IP> to <local-IP>

How to block IP Address in Ubuntu Firewall

In This UFW Tutorial We are going to learn how to block IP address in Ubuntu Firewall.

To block a IP Address we use ufw deny command. We can block All network traffic or we can block IP address on Certain Network Ports.

ufw deny from <Remote-IP> to <Local-IP> proto <Protocol> port <Port Number>

How to Delete rules in UFW Ubuntu Firewall using ufw delete command

In This Ubuntu Firewall tutorial We are going to Learn How to Delete Firewall Rules in Ubuntu Firewall. In Ubuntu Firewall, we can delete firewall rules by the rule number or the original rule by using ufw delete command.

Easiest and best method is to remove firewall rules by the rule number. We can find the corresponding rule number using ufw status numbered command.