微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

linux – 如何配置openvpn仅为绑定到tun接口的进程代理流量?

我正在尝试配置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的帖子.

原文地址:https://www.jb51.cc/linux/398134.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐