|
本帖最后由 99010 于 2024-4-12 08:49 编辑
与fullcone、hwnat冲突,与fullcone、hwnat冲突,与fullcone、hwnat冲突
以mt7621的openwrt官方23.05.x固件为例(其他架构自行对照)
安装ua2f(https://github.com/Zxilly/UA2F)
- wget https://github.com/Zxilly/UA2F/releases/download/v4.5.0/ua2f_4.5.0-1_mipsel_24kc.ipk
- opkg update
- opkg install ua2f_4.5.0-1_mipsel_24kc.ipk
复制代码 设置ua2f- uci set ua2f.enabled.enabled=1
- uci set ua2f.firewall.handle_fw=1
- uci set ua2f.firewall.handle_tls=1
- uci set ua2f.firewall.handle_intranet=1
- uci set ua2f.main.custom_ua="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36 Edg/112.0.1722.68"
- uci commit ua2f
- service ua2f enable
- service ua2f restart
复制代码
强制ttl值,伪装成Windows系统(对应ua2f的自定义,下面代码全部复制粘贴)
- cat << EOF >/etc/nftables.d/12-mangle-ttl-128.nft
- chain mangle_postrouting_ttl128 {
- type filter hook postrouting priority 300; policy accept;
- counter ip ttl set 128
- }
- chain mangle_prerouting_ttl128 {
- type filter hook prerouting priority 300; policy accept;
- counter ip ttl set 128
- }
- EOF
- service firewall restart
复制代码
开启ntp服务
- sed -i 's#openwrt.pool.ntp.org#cn.pool.ntp.org#g' /etc/config/system
- uci set system.ntp.enable_server=1
- uci commit system
- service system restart
复制代码
拦截ntp对时
- uci add firewall redirect
- uci set firewall.@redirect[-1]=redirect
- uci set firewall.@redirect[-1].name='Intercept-NTP'
- uci set firewall.@redirect[-1].src='lan'
- uci set firewall.@redirect[-1].src_dport='123'
- uci set firewall.@redirect[-1].proto="udp"
- uci set firewall.@redirect[-1].family="any"
- uci set firewall.@redirect[-1].target='DNAT'
- uci commit firewall
- service firewall restart
复制代码
拦截dns解析(只能拦截明文,DoH之类不能拦截)
- uci add firewall redirect
- uci set firewall.@redirect[-1]=redirect
- uci set firewall.@redirect[-1].name='Intercept-DNS'
- uci set firewall.@redirect[-1].src='lan'
- uci set firewall.@redirect[-1].src_dport='53'
- uci set firewall.@redirect[-1].proto="tcp udp"
- uci set firewall.@redirect[-1].family="any"
- uci set firewall.@redirect[-1].target='DNAT'
- uci commit firewall
- service firewall restart
复制代码
如果是DHCP客户端模式,还需要配置:网络--->接口--->wan,编辑,请求 DHCP 时发送的主机名,选“不发送主机名”
- uci set network.wan.hostname='*'
- uci commit network
- service network restart
复制代码
+++++++++++++++++++++++++++++
深澜认证脚本(自行修改脚本内的认证IP)
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即注册
×
|