Firewalld字符管理工具
1、Firewalld防火墙维护命令
1、防火墙进程操作
systemctl start firewalld
[root@localhost ~]# systemctl start firewalld
设置 firewalld 为开机自启动
systemctl status firewalld
[root@localhost ~]# systemctl enable firewalld
如果 firewalld 正在运行,通过 systemctl status firewalld 或 firewall-cmd 命令 可以查看其运行状态
systemctl restart firewalld
[root@localhost ~]# systemctl status firewalld
关闭防火墙:
systemctl stop firewalld
2、防火墙管理操作
irewall-cmd命令
支持全部防火墙特性
对于状态和查询模式,命令只返回状态,没有其他输出
–permanent参数:携带该参数表示永久配置,否则表示运行时配置
[–zone=] 选项:不携带此选项表示针对默认区域操作,否则针对指定区域操作
防火墙重载配置命令
1、firewall-cmd - --–reload
[root@localhost ~]# firewall-cmd --reload
2、firewall-cmd --complete-reload ###状态信息将会丢失
[root@localhost ~]# firewall-cmd --complete-reload
3、systemctl restart firewalld
查询预定义信息命令
1、查询预定义信息命令
[root@localhost ~]# firewall-cmd --get-zones
2、查看预定义的服务
[root@localhost ~]# firewall-cmd --get-services