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

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.1tg.com.cn/html/server/linux/2021/0523/3821.html

dawei作者

【声明】:糖果站长网内容转载自互联网,其相关言论仅代表作者个人观点绝非权威,不代表本站立场。如您发现内容存在版权问题,请提交相关链接至邮箱:bqsm@foxmail.com,我们将及时予以处理。
上一篇
下一篇

为您推荐

联系我们

联系我们

0577-28828765

在线咨询: QQ交谈

邮箱: xwei067@foxmail.com

工作时间:周一至周五,9:00-17:30,节假日休息
返回顶部

【免责声明】本站内容转载自互联网,其发布内容言论不代表本站观点,如果其链接、内容的侵犯您的权益,烦请提交相关链接至邮箱xwei067@foxmail.com我们将及时予以处理。

Copygight © 2013-2023 https://www.1tg.com.cn All Rights Reserved.糖果站长网

站长:xwei067#foxmail.com(请把#换成@)