Linux防火墙设置常用命令[亲测有效]

(23) 2023-03-27 12:16

Hi,大家好,我是编程小6,很荣幸遇见你,我把这些年在开发过程中遇到的问题或想法写出来,今天说一说Linux防火墙设置常用命令[亲测有效],希望能够帮助你!!!。
Linux防火墙设置常用命令[亲测有效]_https://bianchenghao6.com/blog__第1张

查看防火墙状态:service firewalld status

 Linux防火墙设置常用命令[亲测有效]_https://bianchenghao6.com/blog__第2张


 

开启防火墙:servicefirewalld start

Linux防火墙设置常用命令[亲测有效]_https://bianchenghao6.com/blog__第3张

 

关闭防火墙:service firewalld stop

Linux防火墙设置常用命令[亲测有效]_https://bianchenghao6.com/blog__第4张

 

 

重启防火墙:

Linux防火墙设置常用命令[亲测有效]_https://bianchenghao6.com/blog__第5张

 

 

开启80端口:

firewall-cmd --zone=public --add-port=80/tcp--permanent

 

Linux防火墙设置常用命令[亲测有效]_https://bianchenghao6.com/blog__第6张

Linux防火墙设置常用命令[亲测有效]_https://bianchenghao6.com/blog__第7张

 

查看端口状态:netstat -tunlp

Linux防火墙设置常用命令[亲测有效]_https://bianchenghao6.com/blog__第8张

  

centos查看端口占用情况:netstat  -anltup | grep 80

上一篇

已是最后文章

下一篇

已是最新文章

发表回复