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
相关推荐
瓦学妹7 小时前
为什么您的AI总是显示“不支持的区域”?如何解决?
大数据·网络·人工智能
coward917 小时前
千兆以太网卡(Ethernet)驱动初始化完成,但是无法udhcpc获取ip
服务器·网络·嵌入式硬件·tcp/ip
软件技术员8 小时前
SSL.com 证书:免费单域名 90 天证书
网络·网络协议·ssl
腾霄星月8 小时前
内网横向移动全套实操重点知识总结
网络·安全·网络安全
茉莉玫瑰花茶9 小时前
IP 分片和组装的具体过程
服务器·网络·tcp/ip
乌萨奇也要立志学C++19 小时前
【Linux】网络基础 从零理解网络通信:局域网、跨网传输与 Socket 预备知识
linux·服务器·网络
网络研究院20 小时前
Cloudflare 推出 Precursor 行为监测系统,全会话追踪技术引爆 AI 机器人防御战与隐私新争议
网络·人工智能·机器人·系统·cloudflare·反爬虫
Bruce_Liuxiaowei1 天前
轻量级 IOC 管理方案:Streamlit 驱动的恶意IP情报平台
网络·jvm·网络协议·tcp/ip·安全
9稳1 天前
基于组态的双向人行道交通灯控制系统设计
开发语言·网络·数据库·labview·plc
2601_965798471 天前
Is Hygia Good for Maid & Janitorial Sites? Technical Audit
服务器·网络·数据库