openwrt 系统下通过命令行设置允许wan口进行Luci页面的访问

复制代码
# 允许 WAN 口访问 HTTP(端口 80)
uci set firewall.http_wan_rule=rule
uci set firewall.http_wan_rule.name='Allow-WAN-HTTP'
uci set firewall.http_wan_rule.src='wan'
uci set firewall.http_wan_rule.dest_port='80'
uci set firewall.http_wan_rule.proto='tcp'
uci set firewall.http_wan_rule.target='ACCEPT'
uci set firewall.http_wan_rule.enabled='1'

# 允许 WAN 口访问 HTTPS(端口 443)
uci set firewall.https_wan_rule=rule
uci set firewall.https_wan_rule.name='Allow-WAN-HTTPS'
uci set firewall.https_wan_rule.src='wan'
uci set firewall.https_wan_rule.dest_port='443'
uci set firewall.https_wan_rule.proto='tcp'
uci set firewall.https_wan_rule.target='ACCEPT'
uci set firewall.https_wan_rule.enabled='1'
复制代码
uci commit firewall
/etc/init.d/firewall restart
相关推荐
ylscode10 小时前
PureLogs 信息窃取恶意软件惊现高危变种:借道 MsBuild.exe 进程空心化实施无痕攻击
网络·安全·安全威胁分析
IPHWT 零软网络10 小时前
MX60E-A信创级智能语音网关技术实现与架构分析
网络·网络安全·国产自研·技术实现·智能语音网关·政企通信·信创技术
IT大白鼠11 小时前
RSTP协议原理与配置详解:快速生成树技术的深度解析
网络·网络协议
C+++Python12 小时前
BIO、NIO、AIO 区别
网络·nio
VOOHU-沃虎13 小时前
沃虎——网络变压器与RJ45集成连接器选型实战:从百兆到10G、从非PoE到4PPoE
网络
2301_7736436213 小时前
华为云存储实验
网络·mysql·华为云
ylscode13 小时前
Windows 内核惊现高危提权漏洞 CVE-2026-40369:沙箱隔离失效,SYSTEM 权限唾手可得
网络·安全·安全威胁分析
jieyu111914 小时前
Wireshark使用指南【超全面】
网络·wireshark
weixin_5206498714 小时前
通信【报文】
网络
志栋智能14 小时前
小步快跑:从单一场景开启超自动化巡检之旅
运维·网络·人工智能·自动化