On Java, Python, Groovy, Grails, Spring, Node.js, Linux, Arduino, ARM, Embedded Devices & Web

  • Recent Posts

    March 2016
    M T W T F S S
    « Jan   Jun »
  • Subscribe Options

  • Awards

  • Most Valuable Blogger @ DZone
  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 175 other followers

  • Follow MyThinkPond on
  • Blog Stats

    • 366,804 hits
  • General Options

CentOS 7 – How to open ports in firewalld?

Posted by Venkatt Guhesan on March 23, 2016

centos_logoPrior to CentOS 7, “iptables” and “shorewall” were the two options avaiable. Since CentOS-7, the default firewall tool is “firewalld”.

Here is a short-guide on how to open two ports in the firewalld application:

firewall-cmd --get-active-zones
# Lets open Jetty Web Server port
firewall-cmd --zone=public --add-port=8080/tcp --permanent
# Lets open some other port 4242 for TCP
firewall-cmd --zone=public --add-port=4242/tcp --permanent
# Commit changes
firewall-cmd --reload
firewall-cmd --list-all



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: