CentOS7.4 防火墙添加端口放行怎么设置?
php吧
全部回复
仅看楼主
level 5
EC青衣 楼主
2022年01月14日 05点01分 1
level 2
我用的是小鸟云服务器CentOS操作系统,是参考文档把以下内容存为wf.sh,然后运行脚本,可以参考下。
#! /bin/bash
read -p "本地端口:" port
firewall-cmd --add-port=$port/tcp --permanent
firewall-cmd --add-port=$port/udp --permanent
firewall-cmd --reload
参考文档:https://www.niaoyun.com/docs/15875.html/?utm_source=tbl-220117
2022年01月14日 09点01分 2
level 5
EC青衣 楼主
我用的是小鸟云服务器CentOS操作系统,是参考文档把以下内容存为wf.sh,然后运行脚本,可以参考下。
#! /bin/bash
read -p "本地端口:" port
firewall-cmd --add-port=$port/tcp --permanent
firewall-cmd --add-port=$port/udp --permanent
firewall-cmd --reload
2022年01月17日 01点01分 3
1