{"id":997,"date":"2015-05-12T10:33:50","date_gmt":"2015-05-12T10:33:50","guid":{"rendered":"http:\/\/www.plugged.in\/?p=997"},"modified":"2015-05-12T10:33:50","modified_gmt":"2015-05-12T10:33:50","slug":"centos-7-firewall-sheet","status":"publish","type":"post","link":"https:\/\/www.veriteknik.net.tr\/en\/centos-7-firewall-sheet\/","title":{"rendered":"CentOS 7 Firewall Sheet"},"content":{"rendered":"<p>The best thing about CentOS 7 is, it has a super easy firewall built-in. I recommend you not to disable the firewall.<\/p>\n<p>To check the active\u00a0zones:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">[root@rh7 ~]# firewall-cmd --get-active-zones\npublic\n  interfaces: enp1s0f0<\/pre>\n<p>To get available service names:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">[root@rh7 ~]# firewall-cmd --get-services\nRH-Satellite-6 amanda-client bacula bacula-client dhcp dhcpv6 dhcpv6-client dns ftp high-availability http https imaps ipp ipp-client ipsec kerberos kpasswd ldap ldaps libvirt libvirt-tls mdns mountd ms-wbt mysql nfs ntp openvpn pmcd pmproxy pmwebapi pmwebapis pop3s postgresql proxy-dhcp radius rpc-bind samba samba-client smtp ssh telnet tftp tftp-client transmission-client vnc-server wbem-https<\/pre>\n<p>If the service you want to enable listed with the command above, you don&#8217;t have to write explicit port number, to allow a service permanently:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">[root@rh7 ~]# firewall-cmd --zone=public --add-service=https --permanent\nsuccess<\/pre>\n<p>If the desired service is not available such as POP3 use the following command:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">[root@rh7 ~]# firewall-cmd --zone=public --add-port=110\/tcp --permanent\nsuccess<\/pre>\n<p>When you finish adding\/removing rules, apply them with the command:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">[root@rh7 ~]# firewall-cmd --reload\nsuccess<\/pre>\n<p>To check the services enabled on the zone public:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">[root@rh7 ~]# firewall-cmd --zone=public --list-all\npublic (default, active)\n  interfaces: enp1s0f0\n  sources: \n  services: dhcpv6-client http https imaps pop3s smtp ssh\n  ports: 7071\/tcp 110\/tcp\n  masquerade: no\n  forward-ports: \n  icmp-blocks: \n  rich rules:<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The best thing about CentOS 7 is, it has a super easy firewall built-in. I recommend you not to disable the firewall. To check the active\u00a0zones: [root@rh7 ~]# firewall-cmd &#8211;get-active-zones public interfaces: enp1s0f0 To get available service names: [root@rh7 ~]# firewall-cmd &#8211;get-services RH-Satellite-6 amanda-client bacula bacula-client dhcp dhcpv6 dhcpv6-client dns ftp high-availability http https imaps [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","footnotes":""},"categories":[370,372,386,399],"tags":[],"yst_prominent_words":[864,336,881,860],"class_list":["post-997","post","type-post","status-publish","format-standard","hentry","category-linux","category-linux_help","category-network","category-security"],"jetpack_featured_media_url":"","uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"ckaraca","author_link":"https:\/\/www.veriteknik.net.tr\/en\/author\/ckaraca\/"},"uagb_comment_info":0,"uagb_excerpt":"The best thing about CentOS 7 is, it has a super easy firewall built-in. I recommend you not to disable the firewall. To check the active\u00a0zones: [root@rh7 ~]# firewall-cmd --get-active-zones public interfaces: enp1s0f0 To get available service names: [root@rh7 ~]# firewall-cmd --get-services RH-Satellite-6 amanda-client bacula bacula-client dhcp dhcpv6 dhcpv6-client dns ftp high-availability http https imaps&hellip;","_links":{"self":[{"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/posts\/997","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/comments?post=997"}],"version-history":[{"count":0,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/posts\/997\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/media?parent=997"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/categories?post=997"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/tags?post=997"},{"taxonomy":"yst_prominent_words","embeddable":true,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/yst_prominent_words?post=997"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}