You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

OpenVPN特定子网客户端无法访问服务器IP导致断网的问题求助

OpenVPN特定子网客户端无法访问服务器IP导致断网的问题求助

大家好,我在Ubuntu Server上搭建了一台OpenVPN服务器,通过ccd功能给两个特定客户端分配了独立的子网段。这两个客户端处于该子网时能正常互相访问,但有个头疼的问题:一旦连接VPN,他们就会失去互联网连接,原因是访问不到OpenVPN服务器的IP。

补充一下:如果客户端从OpenVPN服务器获取默认的子网IP,上网就完全没有问题。

下面是我的服务器相关配置信息:

  • 服务器默认IP段:10.8.0.0
  • 特定客户端子网IP段:10.9.0.0

server.conf配置

local *MY IP*
port 1194
proto udp
dev tun
ca ca.crt
cert server.crt
key server.key
dh dh.pem
auth SHA512
tls-crypt tc.key
topology subnet
server 10.8.0.0 255.255.255.0
client-config-dir ccd
route 10.9.0.0 255.255.255.0
client-to-client
management 127.0.0.1 5555
ifconfig-pool-persist ipp.txt
push "redirect-gateway def1 bypass-dhcp"
push "block-outside-dns"
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS..."

我还可以提供iptables配置文件,希望大家能帮忙排查一下这个问题,谢谢!

备注:内容来源于stack exchange,提问作者Kevin De Vincenzo

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.17 09:40:25