Solve the problem that iptables does not exist in CentOS 6.6,/etc/sysconfig /.

Source: Internet
Author: User

Solve the problem that iptables does not exist in CentOS 6.6,/etc/sysconfig /.

In the latest CentOS 7 linux system, changing the default firewall to firewalld replaces the previous iptables firewall. How can I enable the iptrables firewall again? This article will show you how to delete the existing firewalld firewall? How to install the iptables firewall before CentOS 7:

Disable firewalld firewall in CentOS 7

First, stop the firewalld service and enter the following command:

1 $ sudosystemctl stop firewalld. service

Disable the firewalld service from automatically starting when the system starts. Enter the following command:

1 $ sudosystemctl disable firewalld. server

If you will not use the firewalld service in the future, you can directly uninstall it and use the following command:

1 $ sudoyum remove firewalld-yCentOS 7 install iptables Firewall

To install the iptables package, run the following command:

1 $ sudoyum install iptables-services

Set the iptables Firewall Service to automatically start when it starts up. Enter the following command:

1 $ sudosystemctl enable iptables

If you want to use/etc/init. d/iptables save command to save the modified firewall policy. Enter the following command to save iptables. the init script overwrites the script after iptables is installed. Enter the following command:

1 $ sudo/usr/libexec/iptables. init/etc/init. d/iptables

In this case, you can run the/etc/init. d/iptables save command.

1 $ sudo/etc/init. d/iptables save

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.