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
相关推荐
乐迪信息5 分钟前
乐迪信息:AI防爆摄像机在船舶监控的应用
大数据·网络·人工智能·算法·无人机
天天睡大觉27 分钟前
Python学习12
网络·python·学习
i建模27 分钟前
如何设置宿主的windows11系统访问HyperV的虚拟机,同时该虚拟机可以上网
网络
陌上花开缓缓归以1 小时前
Linux 5.4内核版本内核宏梳理
linux·网络·github
idontknow2332 小时前
DPDK学习笔记(1):二层转发应用例代码解析
c语言·网络·笔记·学习
2301_803554523 小时前
阻塞,非阻塞,同步,异步以及linux上的5种IO模型阻塞,非阻塞,信号驱动,异步,IO复用
java·服务器·网络
JAVA+C语言3 小时前
多主机 TCP 通信
网络·windows·tcp/ip
Gensors传感器3 小时前
Gensors解读:TCP/IP协议在压力扫描系统中的作用详解
网络·网络协议·tcp/ip·压力测试·压力扫描阀·扫描阀
云游云记3 小时前
php 网络请求工具全解:cURL 与 Guzzle 总结
开发语言·网络·php
旖旎夜光4 小时前
Linux(12)(下)
linux·网络