Question: How to Open Port Linux?
Contents

How do I open a port on Ubuntu?

Ubuntu and Debian

  • Issue the following command to open port 1191 for TCP traffic. sudo ufw allow 1191/tcp.
  • Issue the following command to open a range of ports. sudo ufw allow 60000:61000/tcp.
  • Issue the following command to stop and start Uncomplicated Firewall (UFW). sudo ufw disable sudo ufw enable.

How check if port is open Linux?

How to check the listening ports and applications on Linux:

  1. Open a terminal application i.e. shell prompt.
  2. Run any one of the following command: sudo lsof -i -P -n | grep LISTEN. sudo netstat -tulpn | grep LISTEN. sudo nmap -sTU -O IP-address-Here.
Robert Thorne

Robert Thorne

Automotive & Future Transportation Editor

Robert Thorne covers electric vehicle innovations, autonomous driving systems, global mobility trends, and automotive engineering developments.

Share this article
Twitter Facebook Pinterest