VPN 客户端通过将本地 IP 路由到 VPN 子网来破坏服务器上的路由表。我无法在 VPN 客户端中更改任何内容,因此我尝试恢复到主机的路由,以便使用 192.168.1.2 作为本地主机地址的应用程序能够正常地相互通信。
我的网络:
Router 192.168.1.1
Server 192.168.1.2
它的正常工作方式如下:
C:\>route print
===========================================================================
Interface List
12...54 6b 25 e0 8e 04 ......Check Point Virtual Network Adapter For SSL Network Extender
3...40 8d 5c e2 80 ad ......Killer E2200 Gigabit Ethernet Controller
1...........................Software Loopback Interface 1
17...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter
8...00 00 00 00 00 00 00 e0 Teredo Tunneling Pseudo-Interface
===========================================================================
IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.1.1 192.168.1.2 25
127.0.0.0 255.0.0.0 On-link 127.0.0.1 331
127.0.0.1 255.255.255.255 On-link 127.0.0.1 331
127.255.255.255 255.255.255.255 On-link 127.0.0.1 331
192.168.1.0 255.255.255.0 On-link 192.168.1.2 281
192.168.1.2 255.255.255.255 On-link 192.168.1.2 281
192.168.1.255 255.255.255.255 On-link 192.168.1.2 281
224.0.0.0 240.0.0.0 On-link 127.0.0.1 331
224.0.0.0 240.0.0.0 On-link 192.168.1.2 281
255.255.255.255 255.255.255.255 On-link 127.0.0.1 331
255.255.255.255 255.255.255.255 On-link 192.168.1.2 281
===========================================================================
Persistent Routes:
None
IPv6 Route Table
===========================================================================
Active Routes:
If Metric Network Destination Gateway
8 331 ::/0 On-link
1 331 ::1/128 On-link
8 331 2001::/32 On-link
8 331 2001:0:9d38:78cf:3068:26aa:3f57:fefd/128
On-link
3 281 fe80::/64 On-link
8 331 fe80::/64 On-link
8 331 fe80::3068:26aa:3f57:fefd/128
On-link
3 281 fe80::6899:a578:4146:29e/128
On-link
1 331 ff00::/8 On-link
8 331 ff00::/8 On-link
3 281 ff00::/8 On-link
===========================================================================
Persistent Routes:
None
跟踪本地 IP 的路由工作正常:
C:\>tracert 192.168.1.2
Tracing route to MAIN [192.168.1.2]
over a maximum of 30 hops:
1 <1 мс <1 мс <1 мс MAIN [192.168.1.2]
Trace complete.
路由器表修复:
route delete 192.168.1.2
route add 192.168.1.2 0.0.0.0
路由表修复应用后(仅测试修复是否在不使用 VPN 客户端的情况下正常工作):
C:\>route print
===========================================================================
Interface List
12...54 6b 25 e0 8e 04 ......Check Point Virtual Network Adapter For SSL Network Extender
3...40 8d 5c e2 80 ad ......Killer E2200 Gigabit Ethernet Controller
1...........................Software Loopback Interface 1
17...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter
8...00 00 00 00 00 00 00 e0 Teredo Tunneling Pseudo-Interface
===========================================================================
IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.1.1 192.168.1.2 25
127.0.0.0 255.0.0.0 On-link 127.0.0.1 331
127.0.0.1 255.255.255.255 On-link 127.0.0.1 331
127.255.255.255 255.255.255.255 On-link 127.0.0.1 331
192.168.1.0 255.255.255.0 On-link 192.168.1.2 281
192.168.1.2 255.255.255.255 On-link 192.168.1.2 26
192.168.1.255 255.255.255.255 On-link 192.168.1.2 281
224.0.0.0 240.0.0.0 On-link 127.0.0.1 331
224.0.0.0 240.0.0.0 On-link 192.168.1.2 281
255.255.255.255 255.255.255.255 On-link 127.0.0.1 331
255.255.255.255 255.255.255.255 On-link 192.168.1.2 281
===========================================================================
Persistent Routes:
None
IPv6 Route Table
===========================================================================
Active Routes:
If Metric Network Destination Gateway
8 331 ::/0 On-link
1 331 ::1/128 On-link
8 331 2001::/32 On-link
8 331 2001:0:9d38:78cf:3068:26aa:3f57:fefd/128
On-link
3 281 fe80::/64 On-link
8 331 fe80::/64 On-link
8 331 fe80::3068:26aa:3f57:fefd/128
On-link
3 281 fe80::6899:a578:4146:29e/128
On-link
1 331 ff00::/8 On-link
8 331 ff00::/8 On-link
3 281 ff00::/8 On-link
===========================================================================
Persistent Routes:
None
跟踪到本地 IP 的路由经过路由器:
C:\>tracert 192.168.1.2
Tracing route to MAIN [192.168.1.2]
over a maximum of 30 hops:
1 * <1 мс <1 мс router.asus.com [192.168.1.1]
2 ^C
如何让它再次使用本地循环进行路由而不是 192.168.1.1?将路由度量更改为 306 也无济于事。