我是靠谱客的博主 英勇跳跳糖,这篇文章主要介绍linux 防火墙的使用方法,Linux防火墙(firewalld)使用方法,,现在分享给大家,希望可以做个参考。

服务启动操作:

启动防火墙

[root@localhost ~]# systemctl start firewalld

关闭防火墙

[root@localhost ~]# systemctl stop firewalld

重启防火墙

[root@localhost ~]# systemctl restart firewalld

查看防火墙状态

[root@localhost ~]# systemctl status firewalld

防火墙配置命令

重载防火墙配置

[root@localhost ~]# firewall-cmd --reload

查看防火墙运行状态

[root@localhost ~]# firewall-cmd --state

查看默认区域

[root@localhost ~]# firewall-cmd --list-all

应急模式

拒绝所有流量,断开远程连接

[root@localhost ~]# firewall-cmd --panic-on

取消应急模式

[root@localhost ~]# firewall-cmd --panic-off

查看是否为应急模式

[root@localhost ~]# firewall-cmd --query-panic

服务

firewall-cmd --add-service=Telnet #添加服务

firewall-cmd --remove-service=Telnet #移除服务

端口

添加端口和协议

[root@localhost ~]# firewall-cmd --add-port=3306/tcp

删除端口和协议

[root@localhost ~]# firewall-cmd --remove-port=3306/tcp

查看开启的端口

@localhost ~]# firewall-cmd --list-ports

协议

添加协议

[root@localhost ~]# firewall-cmd --remove-protocol=icmp

取消协议

[root@localhost ~]# firewall-cmd --remove-protocol=icmp

查看添加的协议

firewall-cmd --list-protocols

最后

以上就是英勇跳跳糖最近收集整理的关于linux 防火墙的使用方法,Linux防火墙(firewalld)使用方法,的全部内容,更多相关linux内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(122)

评论列表共有 0 条评论

立即
投稿
返回
顶部