UFW Firewall: How to open a port

U

How Can We Help?

UFW Firewall: How to open a port

When you would like to grant SSH access on a Ubuntu machine, you would need to allow access to port 22. In order to allow access to port 22 you would need to add a rule to ufw to open up access to port 22.

To allow access to port 22 you would need to do the following:

  1. Open a new Terminal Window
  2. Enter the following command:
    sudo ufw allow 22
  3. The typical success message will look similar to the below:
    Rules updated
    Rules updated (v6)

     

  4. Replace 22 with your port number that you would like to grant access to.

About the author

Ian Carnaghan

I am a software developer and online educator who likes to keep up with all the latest in technology. I also manage cloud infrastructure, continuous monitoring, DevOps processes, security, and continuous integration and deployment.

About Author

Ian Carnaghan

I am a software developer and online educator who likes to keep up with all the latest in technology. I also manage cloud infrastructure, continuous monitoring, DevOps processes, security, and continuous integration and deployment.

Follow Me