防火墙相关命令

启动

shell> systemctl start firewalld

停止

shell> systemctl stop firewalld

重启

shell> systemctl restart firewalld

允许开机自启

shell> systemctl enable firewalld

不允许自启

shell> systemctl disable firewalld

查看状态

firewall-cmd --state

查看开放端口

shell> firewall-cmd --list-ports

添加端口

shell> firewall-cmd --add-port=8080/tcp --permanent

删除端口

shell> firewall-cmd --remove-port=8080/tcp --permanent

重新加载

shell> firewall-cmd --reload

本文作者:xiaoovo

本文链接:https://www.cnblogs.com/xiaoovo/p/17059678.html

版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行许可。

posted @   xiaoovo  阅读(24)  评论(0编辑  收藏  举报
点击右上角即可分享
微信分享提示
💬
评论
📌
收藏
💗
关注
👍
推荐
🚀
回顶
收起
🔑