How to disable firewall (Firewalld) on CentOS7

Source: Internet
Author: User
Tags symlink iptables

In CentOS7, firewalld replaced iptables, but both iptables and firewalld were running based on the system. With the rapid development of cloud services, such as AWS's Security Group, Alibaba Cloud Security provides simple management and powerful firewall functions. Therefore, you prefer to disable the system firewall function and use the firewall function provided by cloud service providers (Alibaba Cloud's CentOS7.1 disables firewalld by default ).

The following describes how to disable Firewalld on CentOS7.

Check whether firewalld is enabled

# Systemctl is-enabled firewalld

Stop firewalld

# Systemctl stop firewalld

Check whether firewalld is stopped

# Systemctl status firewalld
Firewalld. service-firewalld-dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld. service; enabled; vendor preset: enabled)
Active: inactive (dead)

Jun 22 16:34:23 zabbix. cc systemd [1]: Stopped firewalld-dynamic ....
Hint: Some lines were ellipsized, use-l to show in full.

Disable automatic startup of firewalld

# Systemctl disable firewalld
Removed symlink/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
Removed symlink/etc/systemd/system/basic.tar get. wants/firewalld. service.

Make sure firewalld starts automatically to close

# Systemctl is-enabled firewalld

1. firewalld introduction

Firewalld is a major feature of centos7 and has two major advantages: support for dynamic updates without restarting the service; the second is the concept of "zone" added to the firewall.
Firewalld has a graphical interface and a tool interface. For more information about the graphic interface, see the official document.
Firewalld's character interface management tool is firewall-cmd
Firewalld has two default configuration files:/usr/lib/firewalld/(system configuration, do not modify as much as possible) and/etc/firewalld/(user configuration address)
Concept of zone:

By default, a hardware firewall generally has three zones. The system has the following areas by default when firewalld introduces this concept (correct if there is an error ):
Drop: all packages are discarded by default.
Block: deny all external connections and allow internal connections
Public: specifies that external connections can enter
External: this is not clear. The function is the same as above. The specified external connection is allowed.
Dmz: like a hardware firewall, restricted public connections can access
Work: work zone. Similar to workgoup, it is also allowed by specified external connections.
Home: similar to a home group
Internal: Trust all connections
I am not very familiar with the firewall. I still don't want to understand the functions of public, external, dmz, work, and home. I need to customize the allowed connections.

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: 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.