Categories
Linux Networking

Enable Ports in Ubuntu 18.0

First check which ports are required by your application or scripts using command sudo netstat -tunlp

Check status of port with:

sudo ufw status

Allow any port using the command, where 80 represent port 80, connection type is tcp:

sudo ufw allow 80/tcp

For udf use command:

sudo ufw allow 80/tcp

Port can also be opened using application name:

Like for ssh: sudo ufw allow ssh

At last reload the firewall, for changes to reflect

sudo ufw reload

To disable firewall:

sudo ufw enable

To deactivate firewall:

sudo ufw disable

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.