Disable firewall in CentOS 7.0

Source: Internet
Author: User

Disable firewall in CentOS 7.0

CentOS 7.0 uses firewall as the firewall by default. You must reset it when using iptables.

1. Directly disable the Firewall

Systemctl stop firewalld. service # stop firewall

Systemctl disable firewalld. service # disable firewall startup

2. Set iptables service

Yum-y install iptables-services

If you want to modify the firewall configuration, such as adding the firewall port 3306

Vi/etc/sysconfig/iptables

Add Rules

-A input-m state -- state NEW-m tcp-p tcp -- dport 3306-j ACCEPT

Save and exit

Systemctl restart iptables. service # restart the firewall to make the configuration take effect.

Systemctl enable iptables. service # Set firewall startup

Restart the system to make the settings take effect.

For more iptables tutorials, see the following:

Disable the default firewall in CentOS 7.0 and enable the iptables firewall.

Iptables examples

Linux Firewall iptables

Basic use of iptables backup, recovery, and firewall scripts

Detailed description of firewall iptables usage rules in Linux

Iptables firewall settings in Linux

This article permanently updates the link address:

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.