{"id":6680,"date":"2017-05-08T12:36:18","date_gmt":"2017-05-08T04:36:18","guid":{"rendered":"http:\/\/rmohan.com\/?p=6680"},"modified":"2017-05-08T12:36:18","modified_gmt":"2017-05-08T04:36:18","slug":"centos-rhel-7-never-run-the-iptables-service-and-firewalld-service-at-the-same-time","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=6680","title":{"rendered":"CentOS \/ RHEL 7 : Never run the iptables service and FirewallD service at the same time!"},"content":{"rendered":"<p>By default, RHEL 7 uses the FirewallD service to provide network security. FirewallD must be stopped and disabled when using the iptables service:<\/p>\n<p># systemctl stop firewalld.service<br \/>\n# systemctl disable firewalld.service<br \/>\n# systemctl enable iptables.service<br \/>\n# systemctl start iptables.service<br \/>\nThe iptables service is now provided by a separate package called iptables-services:<\/p>\n<p># yum info iptables-services<br \/>\nName        : iptables-services<br \/>\nArch        : x86_64<br \/>\nVersion     : 1.4.21<br \/>\nRelease     : 13.el7<br \/>\nSize        : 23 k<br \/>\nRepo        : installed<br \/>\nFrom repo   : anaconda<br \/>\nSummary     : iptables and ip6tables services for iptables<br \/>\nURL         : http:\/\/www.netfilter.org\/<br \/>\nLicense     : GPLv2<br \/>\nDescription : iptables services for IPv4 and IPv6<br \/>\n            :<br \/>\n            : This package provides the services iptables and ip6tables that have been split<br \/>\n            : out of the base package since they are not active by default anymore.<br \/>\nThe iptables-services package may need to be installed 1st:<\/p>\n<p># systemctl -a|grep iptables<br \/>\n? iptables.service                      not-found inactive dead      iptables.service<br \/>\nStop and disable the firewalld service first.<\/p>\n<p># systemctl stop firewalld.service<br \/>\n# systemctl disable firewalld.service<br \/>\nRemoved symlink \/etc\/systemd\/system\/dbus-org.fedoraproject.FirewallD1.service.<br \/>\nRemoved symlink \/etc\/systemd\/system\/basic.target.wants\/firewalld.service.<br \/>\nIf you try to enable the iptables service, it would fail.<\/p>\n<p># systemctl enable iptables.service<br \/>\nFailed to execute operation: No such file or directory<br \/>\nInstall the iptables-services package.<\/p>\n<p># yum install iptables-services -y<br \/>\nEnable the iptables service :<\/p>\n<p># systemctl enable iptables.service<br \/>\nCreated symlink from \/etc\/systemd\/system\/basic.target.wants\/iptables.service to \/usr\/lib\/systemd\/system\/iptables.service.<br \/>\nStart the iptables service :<\/p>\n<p># systemctl start iptables.service<br \/>\n#<\/p>\n","protected":false},"excerpt":{"rendered":"<p>By default, RHEL 7 uses the FirewallD service to provide network security. FirewallD must be stopped and disabled when using the iptables service:<\/p>\n<p># systemctl stop firewalld.service # systemctl disable firewalld.service # systemctl enable iptables.service # systemctl start iptables.service The iptables service is now provided by a separate package called iptables-services:<\/p>\n<p># yum info iptables-services [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[73],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6680"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6680"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6680\/revisions"}],"predecessor-version":[{"id":6681,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6680\/revisions\/6681"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6680"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6680"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6680"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}