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
相关推荐
基于底层的菜鸟1 小时前
网络抓包工具——tcpdump &&icmpv6抓包
网络·测试工具·tcpdump
tang777893 小时前
如何保护网络隐私?从理解代理IP开始
网络·tcp/ip·php
捷米研发三部7 小时前
ProfiNet转Modbus TCP协议转换网关实现西门子PLC与工控机通讯在智能交通系统的应用案例
网络·网络协议
dreamtm1238 小时前
通俗理解 TCP 拥塞控制:像 “快递员看路况调速”,避免网络 “堵车”
网络·tcp/ip·php
ASKED_201913 小时前
常用 Linux 命令大全(文件、网络、时间、进程、数据库、工具全覆盖)
linux·网络·数据库
我还可以再学点14 小时前
八股文面试攻略四:网络篇
网络·面试·职场和发展
q***766614 小时前
显卡(Graphics Processing Unit,GPU)架构详细解读
大数据·网络·架构
网安小白的进阶之路14 小时前
B模块 安全通信网络 第一门课 园区网实现与安全-1
网络·安全
dragoooon3416 小时前
[Linux网络——Lesson2.socket套接字 && 简易UDP网络程序]
linux·网络·udp