记录下来防止自己忘记,同时也积累一些知识,还有很多需要补充完善的地方,请大家多多指教!!
1,如果有安装iptables,禁用iptables服务
# 查看状态
[root@yangbin ~]# systemctl status iptables.service
# 停止iptables服务
[root@yangbin ~]# systemctl stop iptables.service
# 禁止启用iptables服务
[root@yangbin ~]# systemctl disable iptables.service
2,启用firewalld
[root@yangbin ~]# systemctl start firewalld.service
3,查看firewall是否在运行
[root@yangbin ~]# systemctl status firewalld.service
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2018-04-12 14:35:10 CST; 1 day 1h ago
Docs: man:firewalld(1)
Main PID: 13217 (firewalld)
CGroup: /system.slice/firewalld.service
└─13217 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid
Apr 12 14:35:54 yangbin firewalld[13217]: WARNING: failed-policy: INVALID_ICMPTYPE: No supported ICMP type., ignoring for run-time.
Apr 12 14:35:54 yangbin firewalld[13217]: WARNING: ICMP type 'reject-route' is not supported by the kernel for ipv6.
Apr 12 14:35:54 yangbin firewalld[13217]: WARNING: reject-route: INVALID_ICMPTYPE: No supported ICMP type., ignoring for run-time.
Apr 12 14:37:53 yangbin firewalld[13217]: ERROR: