1、open-vpn路由设置
主要由 route-nopull、vpn_gateway、net_gateway 三个参数决定
route-nopull :当客户端加入这个参数后,openvpn 连接后不会添加路由,也就是不会有任何网络请求走 openvpn.
vpn_gateway:指定需要走vpn的路由;
net_gateway:指定不需要走vpn的路由; max-routes 参数表示可以添加路由的条数,默认只允许添加100条路由,如果少于100条路由可不加这个参数.
route-nopull
route 139.9.114.177 255.255.255.255 vpn_gateway
route 192.168.6.0 255.255.255.0 vpn_gateway
route 192.168.5.0 255.255.255.0 vpn_gateway
route 192.168.1.0 255.255.255.0 net_gateway
网友评论