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
相关推荐
威联通网络存储3 小时前
某大型制造企业基于威联通 NAS 的海量数据存储与容灾归档实践
网络·nas
二进制person6 小时前
JavaEE初阶 --网络编程
linux·服务器·网络
Oll Correct6 小时前
实验八:验证以太网交换机的生成树协议STP
网络·笔记
Irissgwe7 小时前
进程间通信
linux·服务器·网络·c++·进程间通信
IT小白38 小时前
windows的VMware虚拟机上的Linux系统(CentOS)配置永久ip(关机重启ip不变)
网络·网络协议·tcp/ip
喵叔哟9 小时前
29_内容生产质量网关Skill:草稿生成+事实校验+发布前检查
网络·人工智能
liulilittle10 小时前
LINUX RING BUFFER TUN/TAP 1
linux·服务器·网络·c++·信息与通信·通信
蛊明10 小时前
批量检测 IP 是否在线:CPing vs QuickPing
网络·网络协议·tcp/ip
路由侠内网穿透.10 小时前
本地部署开源书签管理工具 LinkAce 并实现外部访问( Linux 版本)
linux·运维·服务器·网络·网络协议·开源
彭泽布衣12 小时前
Linux如何指定源端口打流
linux·运维·网络