How To Ubuntu Linux Firewall Open Port Command
In Ubuntu, you can use the ufw (Uncomplicated Firewall) tool to open a specific port. Here's how:
- Install
ufwif it's not already installed:sudo apt-get update sudo apt-get install ufw - Enable the firewall:
sudo ufw enable - Allow incoming traffic on the desired port:
sudo ufw allow port_numberReplace
port_numberwith the actual port number that you want to open. For example, to open port 80 (HTTP), you would use:sudo ufw allow 80 - Verify the firewall rules:
sudo ufw statusThis will display the current firewall rules, including the newly opened port.
