
一旦拨了openvpn之后,默认本地所有的流量都会走vpn隧道。如果你有特定的需求,只希望某个网段走vpn,其他网段还是走本地流量,或者是希望除了某个网段外,其他流量都走vpn,可以在openvpn的配置文件中增加以下配置:
除了指定网段外其他网段走本地流量
1 2
| route-nopull route 192.168.1.0 255.255.255.0 vpn_gateway
|
除了指定网段外其他网段走VPN
1
| route 192.168.1.0 255.255.255.0 net_gateway
|