How to open ports on Centos 8 /RHEL 8 Linux
Linx has a tool called firewalld which is very easy to use but powerful enough to handle most of the tasks about firewalls. How to open on RHEL 8 / CentOS 8 Linux using filewalld.
What is Firewalld
firewalld is a firewall management tool for Linux operating systems. It provides firewall features by acting as a front-end for the Linux kernel’s netfilter framework via the nftables userspace utility (before v0.6.0 iptables backend),[2] acting as an alternative to the nft command line program. The name firewalld adheres to the Unix convention of naming system daemons by appending the letter “d”.
https://en.wikipedia.org/wiki/Firewalld
there is official website of firewalld you can visit the site by clicking this link go to firewalld official website
Requirements
| Type | Requirements |
| OS | RHEL 8/CentOs 8 |
| Programme | firewall-cmd 0.6.3 or higher |
| access | must need to have root access to your OS using sudo command or you must logged in as root |
How to open ports on RHEL 8 / CentOS 8 Linux steps
now we are going to open ports on RHEL 8 / CentOS with commands.
Step 1 List already opened Ports
Before opening some port we need to check which port is already opened. To check already opened port you copy and paste the following command on your terminal.
firewall-cmd --list-all
Step 2 check The Service
Now we are going to check the service we want to use is available as a preconfigured feature or not to check the service copy and paste the following command on your terminal
firewall-cmd --get-services
Step 3 Check the Zones
There are more than one type of zones on firewalld but in most cases, in real-time we are interested on public zone or block zone, to check available zone you can run following command on your terminal.
firewall-cmd --get-zones
Step 4 Open Port service
If your desired service is available on step 2 then open the port by following the command in this article I am going to use HTTP service and zone public for the test purpose, you can use other services as per your desire.
Let’s open service first
For example I am opening zone with public and service HTTP.
firewall-cmd --zone=public --permanent --add-service=http
Let’s open desired post
generally, the port 80 is already opened as a part of preconfigured service so am opening 8080 for test purpose.
for example I am opening the port 8080
firewall-cmd --zone=public --permanent --add-port 8080/tcp
Step 5 Reload Firewall
After you opened the port need to reload the firewall to affect and smooth use of the port and its functionality to reload firewall copy and past the following command on your terminal.
firewall-cmd --reload
Step 6 Confirm opened port
Run the following command on your terminal, if you found the port you have just opened then you are ready to use the port for your desired task.
firewall-cmd --list-all
this is How you How to open ports on Centos 8 /RHEL 8 Linux we hope you have learned something here if you want to set up your web development environment on LAMP stack then please visit our LAMP stack setup on Linux article here
GOOD LUCK !!!!!

If you want to use the photo it would also be good to check with the artist beforehand in case it is subject to copyright. Best wishes. Aaren Reggis Sela
i am creating it by myself 🙂
I really enjoy the blog post. Thanks Again. Really Great. Hedvig Aron Zuckerman
Thank you !!
Really informative blog. Much thanks again. Want more. Lyssa Edsel Gudrun
Thank you !!
Thanks again for the blog. Thanks Again. Fantastic. Neila Aldridge Tiffany
Thank you !!
Very good article post.Much thanks again. Awesome. Charline Frymark
I really like the design and contents of your web page
Thanks again for the article. Really Cool.
Very informative blog article.Much thanks again. Fantastic.
I am incessantly thought about this, thanks for posting.
I reckon something truly special in this website.
I think it is a fluent sharing, I will recommend your site to my friends
Very informative blog article.Much thanks again. Fantastic.
I like a very useful article, I like our page and follow it
Have you ever thought about adding a little bit more
than just your articles? I mean, what you say is important
and all. But think about if you added some great images or video clips to
give your posts more, “pop”! Your content is excellent but with
images and video clips, this website could definitely be one of the greatest in its field.
Fantastic blog!