The Uncomplicated Firewall (UFW) is a frontend for the Linux firewall that makes it easy to manage the firewall rules on an Ubuntu or Debian Linux system. To open the SSH 22/TCP port using UFW on an Ubuntu or Debian Linux system, you can follow these steps:
Open a terminal window on the Ubuntu or Debian system.
Check the status of the UFW firewall by running the following command:
sudo ufw status
This command will display the current status of the UFW firewall, including any rules that are currently in place.
sudo ufw enable
This command will enable the UFW firewall and start enforcing the firewall rules.
sudo ufw allow 22/tcp
This command will add a rule to the UFW firewall that allows incoming connections on the 22/TCP port.
sudo ufw status
This command should display the new rule that allows incoming connections on the 22/TCP port.
ufw delete
command. For example, to delete the rule that allows incoming connections on the 22/TCP port, run the following command:sudo ufw delete allow 22/tcp
By following these steps, you can use the UFW firewall to open the SSH 22/TCP port on an Ubuntu or Debian Linux system. For more information on how to use the UFW firewall on an Ubuntu or Debian Linux system, you can refer to the UFW documentation or the Linux documentation.