OpenVPN 可以工作,但其他与服务器的连接会绕过 VPN

OpenVPN 可以工作,但其他与服务器的连接会绕过 VPN

我的客户端机器(Windows 7)可以正常连接到服务器(Ubuntu)的 OpenVPN,但是当我想要访问服务器的网站时,这些连接并没有通过 VPN 路由……我该如何解决这个问题?

答案1

我认为你可以考虑添加推“重定向网关”选项到您的 OpenVPN 配置。

# If enabled, this directive will configure
# all clients to redirect their default
# network gateway through the VPN, causing
# all IP traffic such as web browsing and
# and DNS lookups to go through the VPN
# (The OpenVPN server machine may need to NAT
# the TUN/TAP interface to the internet in
# order for this to work properly).
# CAVEAT: May break client's network config if
# client's local DHCP server packets get routed
# through the tunnel.  Solution: make sure
# client's local DHCP server is reachable via
# a more specific route than the default route
# of 0.0.0.0/0.0.0.0.
push "redirect-gateway"

问候。

相关内容