How to Open Port with Firewalld on CentOS

1. Install with the command

yum install firewalld


2. Then enable with the command

systemctl enable firewalld


3. Start the service with the command

systemctl start firewalld


4. To check whether it is running or not, you can use the command

systemctl status firewalld atau firewall-cmd --state


5. After that check, the default zone used with the command

firewall-cmd --get-default-zone dan zone yang aktif dengan perintah firewall-cmd --get-active-zones


6. Then to add ports to open can use the command

firewall-cmd --zone=public --permanent --add-port=8288/tcp


7. After adding the service needs to be restarted with the command

firewall-cmd --reload atau systemctl restart firewalld


8. To check the results of the configuration / rule that has just been added, you can use the command

firewall-cmd --list-all


9. Selanjutnya bisa tes dari luar server dengan perintah telnet ke port server

telnet x.x.x.x port

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.