This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(1)
我假设您设置为“通过 VPN 发送所有流量”(
redirect-gateway def1
)如果是这样,当您断开连接时,与 OpenVpn 相关的所有路由都应自动删除,以便恢复您之前的网络 (
net_gateway
)。但是,如果您想在 OpenVpn 断开连接后阻止互联网访问,有多种选择。
一种方法是将default路由到您的vpn_gateway(即下面示例中的10.80.0.25)
这可以使用down脚本或通过粘度的 GUI。
解决此问题的其他方法可以在此处找到
I assume that you're setup to "send all traffic over vpn" (
redirect-gateway def1
)If so, when you disconnect, all routes related to OpenVpn should be automatically deleted, so that your prior network is restored (
net_gateway
)However if you want to Block Internet Access after OpenVpn disconnects, there are several options.
One way is to route default to your vpn_gateway (ie 10.80.0.25 in the below example)
This can be done with a down script or through Viscosity's GUI.
Other approaches to solve this problem can be found here