FRITZ!Box修改DNS路由后WireGuard VPN无法连接的故障排查求助
大家好,我最近在给家里网络配置Pi-Hole拦截设备硬编码DNS后,遇到了WireGuard VPN彻底无法连接的问题,想请各位帮忙分析原因、提供排查思路。以下是我的完整情况说明:
网络基础环境
- 路由器:FRITZ!Box 6591 Cable
- Pi-Hole设备:树莓派Zero W,通过LAN连接路由器,IP地址为192.168.178.61
- 原本Pi-Hole与整个网络运行正常,问题出现在我修改DNS路由规则之后
前期操作(拦截硬编码DNS)
我发现家里不少设备(如谷歌系设备)会绕过路由器指定的DNS,使用硬编码的8.8.8.8/8.8.4.4,于是通过FRITZ!Box配置路由规则拦截:
- 添加两条IPv4静态路由:将目标地址8.8.8.8和8.8.4.4(子网掩码均设为255.255.255.255),全部转发至Pi-Hole的IP 192.168.178.61
- 初始验证有效:ping这两个谷歌DNS地址均超时,符合拦截预期
当前核心问题
配置完上述路由规则后,原本正常连接的WireGuard VPN突然中断,之后无论用哪台设备尝试,都无法重新建立连接。
WireGuard VPN客户端配置
[Interface] PrivateKey = [REDACTED FOR PRIVACY] Address = 192.168.178.202/24 DNS = 192.168.178.1, fritz.box [Peer] PublicKey = [REDACTED FOR PRIVACY] PresharedKey = [REDACTED FOR PRIVACY] AllowedIPs = 192.168.178.0/24, 0.0.0.0/0 Endpoint = REDACTEDFORPRIVACY.myfritz.net:50974 PersistentKeepalive = 25
VPN客户端关键日志片段
12:45:53 - peer(2MQH…8IT4) - UAPI: Updating endpoint
12:45:53 - Routine: receive incoming v4 - stopped
12:45:53 - Routine: receive incoming v6 - stopped
12:45:53 - UDP bind has been updated
12:45:53 - Routine: receive incoming v6 - started
12:45:53 - Routine: receive incoming v4 - started
12:45:58 - peer(2MQH…8IT4) - Handshake did not complete after 5 seconds, retrying (try 2)
12:45:58 - peer(2MQH…8IT4) - Sending handshake initiation
12:46:04 - peer(2MQH…8IT4) - Handshake did not complete after 5 seconds, retrying (try 2)
12:46:04 - peer(2MQH…8IT4) - Sending handshake initiation
12:46:09 - peer(2MQH…8IT4) - Handshake did not complete after 5 seconds, retrying (try 2)
12:46:09 - peer(2MQH…8IT4) - Sending handshake initiation
补充说明
家里的外网连接本身正常——我仍能通过远程服务控制智能家居设备,说明路由器的外网出口没有问题。
备注:内容来源于stack exchange,提问作者FledDev

