Menu
User

DropVPS Team

Writer: Cooper Reagan

How to open TCP port in Centos 8

How to open TCP port in Centos 8

Publication Date

07/27/2025

Category

Articles

Reading Time

2 Min

Table of Contents

When you’re running a server on CentOS 8, opening a specific TCP port is often necessary to allow incoming connections — whether it’s for a web app, database, or custom service.

Step 1 – Check if Firewalld Is Running

Make sure the firewall service is active:

sudo systemctl status firewalld

If it’s not running, start and enable it:

sudo systemctl start firewalld
sudo systemctl enable firewalld

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

To allow a specific TCP port through the firewall:

sudo firewall-cmd --permanent --add-port=8080/tcp

Reload the firewall to apply changes:

sudo firewall-cmd --reload

Replace 8080 with any TCP port you need.

Step 3 – Confirm the Port Is Open

Check the list of open ports:

sudo firewall-cmd --list-ports

You should see something like:

8080/tcp

That’s all you need to open any TCP port on CentOS 8. It takes only a few commands to allow access for your services or applications.

Linux VPS
🐧Linux VPS

Need a Linux Server for This?

Run Debian, Ubuntu, or any Linux distro on DropVPS — fast NVMe SSD, full root access, and 24/7 support. Perfect for everything you just read.

  • Full Root Access
  • Debian & Ubuntu Ready
  • 99.99% Uptime
  • 24/7 Support
Get Linux VPS →

No commitment · Cancel anytime

U
Loading...

Related Posts