{"id":701,"date":"2014-12-24T18:20:14","date_gmt":"2014-12-24T18:20:14","guid":{"rendered":"http:\/\/www.incredigeek.com\/home\/?p=701"},"modified":"2018-04-27T15:33:30","modified_gmt":"2018-04-27T15:33:30","slug":"how-to-allow-a-port-through-firewalld","status":"publish","type":"post","link":"https:\/\/www.incredigeek.com\/home\/how-to-allow-a-port-through-firewalld\/","title":{"rendered":"How to Allow a Port Through Firewalld"},"content":{"rendered":"<p>Note: If you have SELinux enabled you&#8217;ll need to allow the port in <a href=\"http:\/\/www.incredigeek.com\/home\/semanage-allow-and-delete-ports-in-centos\/\">semanage<\/a>.<\/p>\n<p>Basic syntax<\/p>\n<pre> firewall-cmd --zone=public --add-port=(port number)\/(protocal)<\/pre>\n<p>So the\u00a0command to allow port 80 through the firewall would be<\/p>\n<pre>firewall-cmd --zone=public --add-port=http\/tcp\r\nor\r\nfirewall-cmd --zone=public --add-port=80\/tcp<\/pre>\n<p>The above command only works for the running instance of firewalld. \u00a0If you want to add the port permanetely you need to run the above command and then run it again with &#8220;&#8211;permanent&#8221; added to the end of the command.<\/p>\n<p>example:<\/p>\n<pre>firewall-cmd --zone=public --add-port=http\/tcp\r\nfirewall-cmd --zone=public --add-port=http\/tcp --permanent<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Note: If you have SELinux enabled you&#8217;ll need to allow the port in semanage. Basic syntax firewall-cmd &#8211;zone=public &#8211;add-port=(port number)\/(protocal) So the\u00a0command to allow port 80 through the firewall would be firewall-cmd &#8211;zone=public &#8211;add-port=http\/tcp or firewall-cmd &#8211;zone=public &#8211;add-port=80\/tcp The above &hellip; <a href=\"https:\/\/www.incredigeek.com\/home\/how-to-allow-a-port-through-firewalld\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[160,206,205,7],"class_list":["post-701","post","type-post","status-publish","format-standard","hentry","category-linux","tag-firewall","tag-firewall-cmd","tag-firewalld","tag-linux-2"],"_links":{"self":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/701","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/comments?post=701"}],"version-history":[{"count":6,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/701\/revisions"}],"predecessor-version":[{"id":1988,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/701\/revisions\/1988"}],"wp:attachment":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/media?parent=701"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/categories?post=701"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/tags?post=701"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}