{"id":6700,"date":"2017-05-08T14:27:00","date_gmt":"2017-05-08T06:27:00","guid":{"rendered":"http:\/\/rmohan.com\/?p=6700"},"modified":"2017-05-08T14:27:00","modified_gmt":"2017-05-08T06:27:00","slug":"centos-rhel-7-how-to-switch-to-iptables-from-firewalld","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=6700","title":{"rendered":"CentOS \/ RHEL 7 : How to switch to iptables from firewalld"},"content":{"rendered":"<p>Question : How to disable firewalld and enable iptables instead?<\/p>\n<p>Answer :<br \/>\nTo switch to from firewalld to iptables follow the steps given below.<\/p>\n<p>1. Firstly ensure the iptables-services package is installed.<\/p>\n<p># yum install -y -q iptables-services<br \/>\n2. Then prepare the iptables rules you wish to use by editing \/etc\/sysconfig\/iptables and \/etc\/sysconfig\/ipt6tables.<\/p>\n<p>3. Next, disable and stop the firewalld service<\/p>\n<p># systemctl disable firewalld<br \/>\nrm &#8216;\/etc\/systemd\/system\/basic.target.wants\/firewalld.service&#8217;<br \/>\nrm &#8216;\/etc\/systemd\/system\/dbus-org.fedoraproject.FirewallD1.service&#8217;<br \/>\n# systemctl stop firewalld<br \/>\n4. Then start iptables services :<\/p>\n<p># systemctl start iptables<br \/>\n# systemctl start ip6tables<br \/>\n5. Enable iptables service to automatically start at boot :<\/p>\n<p># systemctl enable iptables<br \/>\nln -s &#8216;\/usr\/lib\/systemd\/system\/iptables.service&#8217; &#8216;\/etc\/systemd\/system\/basic.target.wants\/iptables.service&#8217;<br \/>\n# systemctl enable ip6tables<br \/>\nln -s &#8216;\/usr\/lib\/systemd\/system\/ip6tables.service&#8217; &#8216;\/etc\/systemd\/system\/basic.target.w<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Question : How to disable firewalld and enable iptables instead?<\/p>\n<p>Answer : To switch to from firewalld to iptables follow the steps given below.<\/p>\n<p>1. Firstly ensure the iptables-services package is installed.<\/p>\n<p># yum install -y -q iptables-services 2. Then prepare the iptables rules you wish to use by editing \/etc\/sysconfig\/iptables and \/etc\/sysconfig\/ipt6tables.<\/p>\n<p>3. Next, [&#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\/6700"}],"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=6700"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6700\/revisions"}],"predecessor-version":[{"id":6701,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6700\/revisions\/6701"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6700"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6700"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6700"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}