Menu
User

DropVPS Team

Writer: Cooper Reagan

How to open TCP port in Ubuntu 24.10?

How to open TCP port in Ubuntu 24.10?

Publication Date

07/27/2025

Category

Articles

Reading Time

2 Min

Table of Contents

Need to allow external traffic through a specific TCP port on Ubuntu 24.10? Whether you’re running a web server, game server, or custom app, you’ll need to open the correct port in your firewall.

Step 1 – Check if UFW is Installed and Active

First, make sure ufw is installed:

sudo apt install ufw -y

Check if the firewall is active:

sudo ufw status

If it’s inactive, enable it:

sudo ufw enable

Step 2 – Open a TCP Port (e.g. Port 8080)

To open a TCP port like 8080, use:

sudo ufw allow 8080/tcp

You can replace 8080 with any port you need (e.g. 80, 443, 3306, etc.).

Step 3 – Confirm the Rule Was Added

Check that the port is now open:

sudo ufw status numbered

You should see a rule like:

[ 1] 8080/tcp                   ALLOW       Anywhere

Step 4 – Open Multiple TCP Ports (Optional)

To open several ports at once:

sudo ufw allow 3000,3001,3002/tcp

Or a full range:

sudo ufw allow 10000:10100/tcp

That’s it — your TCP port is now open and ready to accept traffic on Ubuntu 24.10.

Linux VPS
U
Loading...

Related Posts

How to open TCP port in Ubuntu 24.10?