小编ano*_*mou的帖子

如何链接两个 OpenVPN 服务器?

我想使用 OpenVPN 建立两个 VPN 的隧道。因此,客户端将连接到第一个 VPN 并重定向到第二个 VPN。(这些都是 VPS,我没有物理访问它,因为稍后它会很重要。)

所以,这是图片:

Client              VPN1                    VPN2
10.8.0.2[tun0]------10.8.0.1[tun0]
[1.1.1.1][eth0]     10.8.100.2[tun1]----------10.8.100.1[tun0]
                    45.55.45.55[eth0]         186.186.186.186[eth0]------internet
Run Code Online (Sandbox Code Playgroud)

服务器配置是一个非常标准的配置:

port 1194
auth-user-pass-verify /etc/openvpn/script/login.py via-env
username-as-common-name
script-security 3
proto udp
dev tun
duplicate-cn
sndbuf 0
rcvbuf 0
vca ca.crt
cert server.crt
key server.key
dh dh.pem
tls-auth ta.key 0
topology subnet
server 10.8.0.0 255.255.255.0 (or 10.8.100.0 in the VPN2)
ifconfig-pool-persist ipp.txt
push "redirect-gateway def1 bypass-dhcp"
keepalive 10 120
cipher AES-128-CBC
comp-lzo
user nobody
group nogroup
persist-key
persist-tun
status openvpn-status.log
verb 3
crl-verify …
Run Code Online (Sandbox Code Playgroud)

networking vpn routing openvpn iptables

5
推荐指数
1
解决办法
3789
查看次数

标签 统计

iptables ×1

networking ×1

openvpn ×1

routing ×1

vpn ×1