CentOS7 Shutdown Firewall Firewall method

Source: Internet
Author: User
Tags iptables

One, CentOS7 default firewall is firewall

1, close firewall firewall: sudo systemctl stop firewalld.service2, shutdown firewall boot: sudo systemctl disable Firewalld.service

Systemctl start Firewalld         # boot,
systemctl enable FIREWALLD        # boot up
systemctl stop Firewalld          # Close
systemctl Disable Firewalld       # Cancel boot
firewall-cmd--state systemctl
unmask firewalld

Execute The failed to start Firewalld.service:Unit is masked appears after the Systemctl start FIREWALLD command. What does this hint mean, is there a

Linux God to help explain the
FIREWALLD service is locked, execute command
systemctl unmask firewalld can unlock the service,
Perform Systemctl mask the next time you need to lock the service FIREWALLD


Second, if you want to use iptables words, then:

3. Install iptables Firewall

Perform the following command to install the Iptables firewall:

sudo yum install iptables

sudo yum install iptables-services4, configuring Iptables firewall, opening the specified port

5. Set iptables firewall boot:

Service iptables Restart #重启

Chkconfig iptables on or systemctl enable Iptables.service power-on self starter

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.