小米AX3000T折腾OpenWrt
¶前置准备
- 小米路由器AX3000T
- 一根网线
- 一台PC或笔记本
有时间的话,可以先看下相关的视频,了解一些前置知识。
OpenWrt防火墙设置,端口转发|通信规则设置,实现内网穿透、远程桌面的首选设置项 - 知乎
¶OpenWrt安装
可以先阅读一下 [OpenWrt 维基百科]小米 AX3000T
主要参考:https://www.cnblogs.com/subeipo/p/18974162
看过的一些帖子:
- J4125软路由2.5G开箱测试体验 保姆级刷机教程&性能测试 – 猫点饭
- OKHK ✨ 小米 AX3000T 路由器刷入使用官方原版 OpenWrt / ImmortalWrt 固件
- 使用OpenWRT搭建内网DNS服务器
- ImmortalWrt Firmware Selector
- OpenWRT 24.10 配置旁路由/中继模式,同时配置作为NAS必备的IPv6公网IP
- 小米 AX3000T 刷机 openwrt 小记
- 小米AX3000T 1.0.84固件不降级成功刷上OpenWrt(一键SSH及Uboot)-小米无线路由器及小米网络设备-恩山无线论坛
- 官方救砖工具 MiWiFi – 下载
- OpenWrt 基础网络配置入门指南-菜鸟笔记
- 小米路由器 AX3000T 刷入 U-boot + ImmortalWrt 过程记录
- 小米AX3000T openwrt刷机——从入坑到刷回原厂
¶汉化
opkg update |
¶Argon主题安装
opkg update |
# 安装中报错: line 2: can't open '/etc/uci-defaults/luci-argon-config |
https://www.regecc.net/openwrt-argon-theme-zh/
https://github.com/jerrykuku/luci-theme-argon/releases
OpenWrt 修改登录页面默认展示的 root 用户名信息,保护隐私
¶禁止全局访问
修改/etc/config/uhttpd文件。config uhttpd 'main'
list listen_http '0.0.0.0:80' # 将0.0.0.0改成当前路由器IP,比如192.168.1.2。如果要修改端口,就将80修改为指定端口。
list listen_http '[::]:80' # 不需要IPv6访问,删除此行
list listen_https '0.0.0.0:443' # 不需要https,删除此行
list listen_https '[::]:443' # 不需要IPv6+https,删除此行
修改完配置后,执行/etc/init.d/uhttpd restart重启即可生效。
¶更换清华源
sed -i 's/downloads.openwrt.org/mirrors.ustc.edu.cn\/openwrt/g' /etc/opkg/distfeeds.conf |
参考:https://mirrors.ustc.edu.cn/help/openwrt.html
¶访问光猫配置
¶IPv6配置
opkg update |
OpenWrt | 在 PPP 拨号模式下启用 IPv6 功能
解决家庭环境宽带断线重播后,有概率无法获取 IPV6 地址的问题
Openwrt 配置IPV4&IPV6 DNAT端口映射,访问内网IPV6地址_openwrt 端口映射
¶可能需要用到
¶一些插件
¶Host Updater
GxxkX/hostupdater: 一个用于OpenWrt的hosts订阅源管理软件包,支持多个hosts源的定时抓取和手动更新。wget https://gh-proxy.com/https://github.com/GxxkX/hostupdater/releases/download/1.0.0/hostupdater_1.0.0-r1_all.ipk
opkg install hostupdater_1.0.0-1_all.ipk
¶DDNS-GO
wget --no-check-certificate https://gh-proxy.com/https://github.com/sirpdboy/luci-app-ddns-go/releases/download/v6.12.5/luci-app-ddns-go_1.5.4-r20250601_all.ipk |
参考:https://github.com/sirpdboy/luci-app-ddns-go
¶SmartDNS
opkg update |
资料参考:
¶TTYD终端
opkg update |
¶家长控制
wget --no-check-certificate https://gh-proxy.com/https://github.com/sirpdboy/luci-app-parentcontrol/releases/download/v1.7.2/luci-app-parentcontrol_1.7.1_all.ipk |
参考:https://github.com/sirpdboy/luci-app-parentcontrol
¶应用过滤(OAF)
插件安装说明、特征库下载wget http://111.230.32.167:8086/files/ipk/luci-app-oaf-helper_1.0.1_all.ipk
opkg install luci-app-oaf-helper_1.0.1_all.ipk
然后重新登陆页面,在服务中即可看到防沉迷助手,根据提示安装对应的版本即可。
¶网络唤醒
opkg update |
配置主板驱动和有线网卡驱动
¶灰色网易云
https://github.com/UnblockNeteaseMusic/luci-app-unblockneteasemusic
如果报错dnsmasq相关问题,需要先写在dnsmasq,再安装dnsmasq-full# 参考:https://github.com/allenkey666/openwrt-shadowsocksR-libev-full/issues/20
opkg remove dnsmasq && opkg install dnsmasq-full
另外:我尝试了IOS18安装的网易云APP,用不了这个,会提示网络连接问题。Windows下的UWP网易云可以。
¶科学上网
nikkinikki-org/OpenWrt-nikki: Transparent Proxy with Mihomo on OpenWrt.
路由器中使用Redir-Host和TPROXY代替Fake-ip和TUN - 薇尔薇
1.Openwrt‐nikki · levi882/Custom_OpenWrt-nikki_Rules Wiki# 执行成功一次即可
wget -O - https://gh-proxy.com/https://github.com/nikkinikki-org/OpenWrt-nikki/raw/refs/heads/main/feed.sh | ash
# you can install from shell or `Software` menu in LuCI
opkg install nikki
opkg install luci-app-nikki
opkg install luci-i18n-nikki-zh-cn
# 卸载或重置
wget -O - https://gh-proxy.com/https://github.com/nikkinikki-org/OpenWrt-nikki/raw/refs/heads/main/uninstall.sh | ash
¶温度监控
https://github.com/izilzty/luci-app-temp-statusopkg update
wget --no-check-certificate -O /tmp/luci-app-temp-status_0.4.1-r1_all.ipk https://gh-proxy.org/https://github.com/gSpotx2f/packages-openwrt/raw/master/current/luci-app-temp-status_0.4.1-r1_all.ipk
opkg install /tmp/luci-app-temp-status_0.4.1-r1_all.ipk
rm /tmp/luci-app-temp-status_0.4.1-r1_all.ipk
/etc/init.d/rpcd reload
wget --no-check-certificate -O /tmp/luci-i18n-temp-status-ru_0.4.1-r1_all.ipk https://gh-proxy.com/https://github.com/gSpotx2f/packages-openwrt/raw/master/current/luci-i18n-temp-status-ru_0.4.1-r1_all.ipk
opkg install /tmp/luci-i18n-temp-status-ru_0.4.1-r1_all.ipk
rm /tmp/luci-i18n-temp-status-ru_0.4.1-r1_all.ipk
¶网络流量监控
timsaya/luci-app-bandixwget --no-check-certificate -O /tmp/bandix_0.8.2-r1_aarch64_cortex-a53.ipk https://gh-proxy.com/https://github.com/timsaya/openwrt-bandix/releases/download/v0.8.2/bandix_0.8.2-r1_aarch64_cortex-a53.ipk
opkg install /tmp/bandix_0.8.2-r1_aarch64_cortex-a53.ipk
wget --no-check-certificate -O /tmp/luci-app-bandix_0.8.2-r1_all.ipk https://gh-proxy.com/https://github.com/timsaya/luci-app-bandix/releases/download/v0.8.2/luci-app-bandix_0.8.2-r1_all.ipk
opkg install /tmp/luci-app-bandix_0.8.2-r1_all.ipk
wget --no-check-certificate -O /tmp/luci-i18n-bandix-zh-cn_25.320.33662.61c987e_all.ipk https://gh-proxy.org/https://github.com/timsaya/luci-app-bandix/releases/download/v0.8.2/luci-i18n-bandix-zh-cn_25.320.33662.61c987e_all.ipk
opkg install /tmp/luci-i18n-bandix-zh-cn_25.320.33662.61c987e_all.ipk
¶配置HTTPS访问
OpenWrt 使用 Lets Encrypt 证书开启 HTTPS 访问
在 OpenWRT 上使用 acme.sh 配置 SSL 证书
使用ACME部署HTTPS证书opkg install luci-app-uhttpd luci-i18n-uhttpd-zh-cn
opkg install acme luci-app-acme luci-i18n-acme-zh-cn acme-acmesh acme-acmesh-dnsapi
¶其他技能
¶实时抓包
opkg update |
Windows 实测只能用 cmd 而不能用 Powershellplink.exe -batch -ssh -pw 123456 root@192.168.1.1 "tcpdump -ni br-lan -s 0 -w - not port 22" | "D:\Program Files\Wireshark\Wireshark.exe" -k -i -
-pw 123456 : Openwrt的ssh密码
root@192.168.1.1 : Openwrt的USER@IP
-ni br-lan : Openwrt上要嗅探的网卡
"D:\Program Files\Wireshark\Wireshark.exe" : Windows中Wireshark的路径
¶源码编译插件包
OpenWrt 编译步骤与命令详解教程 - P3TERX ZONE