我正在尝试配置openvpn,以便只有来自某些进程的流量通过vpn,但这些进程可以连接到任何地方.
我试图通过让openvpn不做任何路由配置(–route-noexec)并让应用程序显式连接到tun接口(例如:curl –interface tun0’http://www.ipchicken.com’ ),但connect()似乎超时了.
为了使tun接口满意,我还需要做一些其他的步骤吗?
解决方法
路由nopull
http://openvpn.net/index.php/open-source/documentation/manuals/69-openvpn-21.html
When used with –client or –pull,accept options pushed by server EXCEPT for routes.
When used on the client,this option effectively bars the server from adding routes to the client’s routing table,however note that
this option still allows the server to set the TCP/IP properties of the client’s TUN/TAP interface.
因此,将route-nopull添加到OpenVPN配置文件中.我写了一篇关于如何使用OpenVPN VPN with cURL/PHP的帖子.