{"id":263,"date":"2018-11-01T14:26:17","date_gmt":"2018-11-01T14:26:17","guid":{"rendered":"http:\/\/thegreenbrain.com.au\/blog\/?p=263"},"modified":"2018-11-01T14:35:42","modified_gmt":"2018-11-01T14:35:42","slug":"centos-7-if-port-is-not-open","status":"publish","type":"post","link":"https:\/\/thegreenbrain.com.au\/blog\/centos-7-if-port-is-not-open\/","title":{"rendered":"CentOS 7 &#8211; If port is not open"},"content":{"rendered":"<p>If you have installed Apache and set up everything correctly on your new CentOS 7 server but still unable to access your website. It might be due to blocked ports caused by firewall. CentOS 7\u2019s built-in firewall is set to block web traffic by default. <\/p>\n<p><strong>Check if port 80 and 443 are blocked<\/strong><\/p>\n<p><strong>Install nmap <\/strong><br \/>\n<code># yum install nmap<\/code><\/p>\n<p><strong>Run the Nmap scan<\/strong><br \/>\n<code>nmap -p 80,443 your-ip-address<\/code><\/p>\n<p>If the ports are blocked, you will see the following result.<\/p>\n<p>PORT    STATE  SERVICE<br \/>\n80\/tcp  closed http<br \/>\n443\/tcp closed https<\/p>\n<p><strong>Configure firewalld to allow web traffic<\/strong><\/p>\n<p><code># sudo firewall-cmd --add-service=http --permanent && sudo firewall-cmd --add-service=https --permanent<br \/>\nsudo systemctl restart firewalld<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you have installed Apache and set up everything correctly on your new CentOS 7 server but still unable to access your website. It might be due to blocked ports caused by firewall. CentOS 7\u2019s built-in firewall is set to block web traffic by default. Check if port 80 and 443 are blocked Install nmap&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,8],"tags":[],"class_list":["post-263","post","type-post","status-publish","format-standard","hentry","category-marketing-automation","category-mautic"],"_links":{"self":[{"href":"https:\/\/thegreenbrain.com.au\/blog\/wp-json\/wp\/v2\/posts\/263","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thegreenbrain.com.au\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thegreenbrain.com.au\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thegreenbrain.com.au\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thegreenbrain.com.au\/blog\/wp-json\/wp\/v2\/comments?post=263"}],"version-history":[{"count":4,"href":"https:\/\/thegreenbrain.com.au\/blog\/wp-json\/wp\/v2\/posts\/263\/revisions"}],"predecessor-version":[{"id":268,"href":"https:\/\/thegreenbrain.com.au\/blog\/wp-json\/wp\/v2\/posts\/263\/revisions\/268"}],"wp:attachment":[{"href":"https:\/\/thegreenbrain.com.au\/blog\/wp-json\/wp\/v2\/media?parent=263"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thegreenbrain.com.au\/blog\/wp-json\/wp\/v2\/categories?post=263"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thegreenbrain.com.au\/blog\/wp-json\/wp\/v2\/tags?post=263"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}