DropVPS Team
Writer: Cooper Reagan
How to open TCP port in Centos 8

Table of Contents
What you will read?
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.
U
Loading...