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
Enabled
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
Disabled
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.