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
相关推荐
分***811 小时前
新版局域网IP扫描神器IPScanner.exe 绿色版V1.28.2,支持跨网段扫描_端口扫描_系统端口查看工具
网络·tcp/ip·端口扫描·ipscanner·局域网扫描
千天夜12 小时前
文件系统磁盘块分配方式:从隐式链接到索引结构
网络·网络协议
嘻哈baby12 小时前
游戏/远程桌面的网络延迟优化:从TCP拥塞控制到智能选路
网络·tcp/ip·游戏
shcoc13 小时前
备用 申请acme 申请ssl
网络·网络协议·ssl
网络小白不怕黑13 小时前
Docker容器网络:从容器互联到跨主机通信
网络·docker·容器
m0_4711996313 小时前
【vue】收银界面离线可用,本地缓存订单,网络恢复后同步
网络·vue.js·缓存
老蒋新思维13 小时前
创客匠人 2025 万人峰会实录:AI 智能体重构创始人 IP 变现逻辑 —— 从 0 到年入千万的实战路径
大数据·网络·人工智能·tcp/ip·创始人ip·创客匠人·知识变现
b0uu13 小时前
2025龙信杯流量分析
网络
松涛和鸣13 小时前
29、Linux进程核心概念与编程实战:fork/getpid全解析
linux·运维·服务器·网络·数据结构·哈希算法
代码不行的搬运工13 小时前
显式拥塞通知(ECN)机制
运维·服务器·网络·算力网络