|
|
|
|
|
|
r***o 发帖数: 1526 | 1 架了个OpenVPN,在client端route table出了点问题,
Windows IP configuration:
Local LAN Adapter
IPv4 Address. . . . . . . . . . . : 10.40.104.11
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 10.40.104.1
VPN Adapter
IPv4 Address. . . . . . . . . . . : 192.168.66.2
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
VPN断开时的route table:
IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 10.40.104.1 10.40.104.11 20
10.40.104.0 255.255.255.0 On-link 10.40.104.11 276
10.40.104.11 255.255.255.255 On-link 10.40.104.11 276
10.40.104.255 255.255.255.255 On-link 10.40.104.11 276
127.0.0.0 255.0.0.0 On-link 127.0.0.1 306
127.0.0.1 255.255.255.255 On-link 127.0.0.1 306
127.255.255.255 255.255.255.255 On-link 127.0.0.1 306
224.0.0.0 240.0.0.0 On-link 127.0.0.1 306
224.0.0.0 240.0.0.0 On-link 10.40.104.11 276
255.255.255.255 255.255.255.255 On-link 127.0.0.1 306
255.255.255.255 255.255.255.255 On-link 10.40.104.11 276
===========================================================================
VPN连上以后的route table:
IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 10.40.104.1 10.40.104.11 20
0.0.0.0 128.0.0.0 192.168.66.1 192.168.66.2 30
10.40.104.0 255.255.255.0 On-link 10.40.104.11 276
10.40.104.11 255.255.255.255 On-link 10.40.104.11 276
10.40.104.255 255.255.255.255 On-link 10.40.104.11 276
108.15.11.229 255.255.255.255 10.40.104.1 10.40.104.11 20
127.0.0.0 255.0.0.0 On-link 127.0.0.1 306
127.0.0.1 255.255.255.255 On-link 127.0.0.1 306
127.255.255.255 255.255.255.255 On-link 127.0.0.1 306
128.0.0.0 128.0.0.0 192.168.66.1 192.168.66.2 30
192.168.66.0 255.255.255.0 On-link 192.168.66.2 286
192.168.66.2 255.255.255.255 On-link 192.168.66.2 286
192.168.66.255 255.255.255.255 On-link 192.168.66.2 286
224.0.0.0 240.0.0.0 On-link 127.0.0.1 306
224.0.0.0 240.0.0.0 On-link 10.40.104.11 276
224.0.0.0 240.0.0.0 On-link 192.168.66.2 286
255.255.255.255 255.255.255.255 On-link 127.0.0.1 306
255.255.255.255 255.255.255.255 On-link 10.40.104.11 276
255.255.255.255 255.255.255.255 On-link 192.168.66.2 286
===========================================================================
VPN连上以后Internet就断开了,只能连VPN server端的IP, 把下面一行从routing
table里删了,所有都正常了
0.0.0.0 128.0.0.0 192.168.66.1 192.168.66.2 30
请问这是什么道理,除了手工删route table entry有什么好的解决办法? | n**********l 发帖数: 271 | 2 if you want all traffic to go through VPN server, enable IP routing,
configure iptables, (NAT)
Why is 0.0.0.0/128.0.0.0 192.168.66.1 there in first place? Check your
openvpn config file for static route injection. If you dont want Internet
traffic to go through VPN, comment all route injections | r***o 发帖数: 1526 | 3 谢谢,OpenVPN是用DD-WRT的GUI设置的,自动加了redirect-gateway def1
改成手工设置,去掉redirect-gateway就不会在client加那一条了
【在 n**********l 的大作中提到】 : if you want all traffic to go through VPN server, enable IP routing, : configure iptables, (NAT) : Why is 0.0.0.0/128.0.0.0 192.168.66.1 there in first place? Check your : openvpn config file for static route injection. If you dont want Internet : traffic to go through VPN, comment all route injections
|
|
|
|
|
|