Firewall shutdown issues in CentOS 7

Source: Internet
Author: User

The newly installed CentOS 7 found that some of the program ports were off, thinking of firewalls and SELinux

Selinx Good close/etc/sysconfig/selinux append selinux=disabled

Firewall thought is also very good to get, according to the old ritual, service iptables stop or chkconfig--level iptables off

Run Systemctl list-unit-files after reboot | grep IP found another ip6tables chkconfig--level ip6tables off

Re-run Systemctl list-unit-files | grep IP Discovery All disables still not through

No way, only add rules, Tptables-i INPUT 1-p tcp--dport 6259-j ACCEPT

Then the service iptables the save port through

I think this is not a bug, maybe I did not find the method, please tell

The firewall in Centos7 is tuned to Firewalld, try Systemctl stop firewalld to turn off the firewall.
I installed CentOS 7 with minimal configuration (OS + dev tools). I am trying to open the port for httpd service, but the something wrong with my iptables service ... what ' s wrong w ITH it? What am I doing wrong?

  # ifconfig/sbin/service iptables savebash:ifconfig/sbin/service:no such file or directory#/sbin/service IPT Ables savethe Service Command supports only basic LSB actions (start, stop, restart, Try-restart, Reload, Force-reload, St ATUs). For other actions, please try the systemctl.# sudo service iptables statusredirecting to/bin/systemctl status iptable  S.serviceiptables.service Loaded:not-found (reason:no such file or directory) active:inactive (dead) #/sbin/service Iptables savethe Service Command supports only basic LSB actions (start, stop, restart, Try-restart, Reload, force-reload , status). For other actions, please try the systemctl.# sudo service iptables startredirecting to/bin/systemctl start iptables. Servicefailed to issue method Call:unit Iptables.service failed to load:no such file or directory.  

With RHEL 7/centos 7, FIREWALLD is introduced to manage iptables. IMHO, FIREWALLD is more suited for workstations than for server environments.

It's possible to go, and a more classic iptables setup. First, stop and mask the FIREWALLD service:

systemctl stop firewalldsystemctl mask firewalld

Then, install the Iptables-services package:

yum install iptables-services

Enable the service at Boot-time:

systemctl enable iptables

Managing the Service

systemctl [stop|start|restart] iptables

Saving your firewall rules can be done as follows:

service iptables save

Or

/usr/libexec/iptables/iptables.init save

Firewall shutdown issues in CentOS 7

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.