level 5
我用的是小鸟云服务器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分