{"id":2768,"date":"2015-10-20T02:51:26","date_gmt":"2015-10-20T02:51:26","guid":{"rendered":"https:\/\/qbytes.cloud\/?p=2768"},"modified":"2015-10-20T02:51:26","modified_gmt":"2015-10-20T02:51:26","slug":"add-port-80-to-firewalld-centos-7","status":"publish","type":"post","link":"https:\/\/www.qbytes.cloud\/index.php\/2015\/10\/20\/add-port-80-to-firewalld-centos-7\/","title":{"rendered":"Add port 80 to firewalld CentOS 7"},"content":{"rendered":"<p>By default the port 80 for http connection is filtered on Redhat 7 as you can only access this port from the actual localhost and not from any other public host. To open a port 80 on RHEL 7 Linux we need to add an iptables rule. For this RHEL7 uses firewall-cmd. First add your port 80 rule with a following command:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# firewall-cmd --permanent --zone=public --add-port=80\/tcp --permanent\n<\/pre>\n<p>Once you add the above firewall rule reload firewall service:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\n# firewall-cmd --reload\n\n<\/pre>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\n# firewall-cmd --permanent --zone=&lt;zone&gt; --add-service=http\n\n<\/pre>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\n# firewall-cmd --permanent --zone=&lt;zone&gt; --add-port=80\/tcp\n\n<\/pre>\n<p>You can check if the port has actually be opened by running:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\n# firewall-cmd --zone=&lt;zone&gt; --query-port=80\/tcp\n\n<\/pre>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\n# firewall-cmd --zone=&lt;zone&gt; --query-service=http\n\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>By default the port 80 for http connection is filtered on Redhat 7 as you can only access this port from the actual localhost and not from any other public host. To open a port 80 on RHEL 7 Linux we need to add an iptables rule. For this RHEL7 uses firewall-cmd. First add your &#8230; <a title=\"Add port 80 to firewalld CentOS 7\" class=\"read-more\" href=\"https:\/\/www.qbytes.cloud\/index.php\/2015\/10\/20\/add-port-80-to-firewalld-centos-7\/\" aria-label=\"Read more about Add port 80 to firewalld CentOS 7\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,40],"tags":[],"class_list":["post-2768","post","type-post","status-publish","format-standard","hentry","category-centos-7","category-firewall"],"_links":{"self":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/2768","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/comments?post=2768"}],"version-history":[{"count":0,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/2768\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/media?parent=2768"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/categories?post=2768"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/tags?post=2768"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}