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
相关推荐
光路科技9 小时前
工业数字化三大核心概念拆解:IIoT、工业互联网与工业4.0
网络
汤愈韬10 小时前
下一代防火墙通用原理
运维·服务器·网络·security
有代理ip12 小时前
网络隐私防护指南:代理服务与换 IP 工具的科学结合
网络·tcp/ip·web安全
不是书本的小明12 小时前
阿里云专有云网络架构
网络·阿里云·架构
mounter62513 小时前
【内核前沿】从 veth 到 netkit:深度解析 TCP devmem 穿透容器屏障的“队列租赁”黑科技
网络·ebpf·linux kernel·devmem tcp·netkit·队列租赁
爱学习的小囧14 小时前
vSphere Supervisor 服务配置指南:自签名容器注册表使用教程
服务器·网络·esxi·虚拟化·vcf
pjwonline114 小时前
反向仲裁:去中心化知识网络中的社会性共识引擎
网络·人工智能·去中心化·区块链·智能合约
空中海14 小时前
5.1 HTTP 与网络请求
网络·网络协议·flutter·http
果汁华15 小时前
Typer:基于类型提示的现代Python CLI框架
开发语言·网络·python
小比特_蓝光15 小时前
深入解析Linux进程:PCB到状态流转
网络