![桥接 openvpn 服务器以使用另一个 openvpn 连接](https://linux22.com/image/702259/%E6%A1%A5%E6%8E%A5%20openvpn%20%E6%9C%8D%E5%8A%A1%E5%99%A8%E4%BB%A5%E4%BD%BF%E7%94%A8%E5%8F%A6%E4%B8%80%E4%B8%AA%20openvpn%20%E8%BF%9E%E6%8E%A5.png)
我为我的服务器安装了 Open VPN Access 服务器。如何桥接/链接两个 VPN 连接 - 这样当用户连接到 VPN 服务器时,该服务器会将所有流量桥接到另一个 VPN。
用户 -> VPN(美国) -> VPN(加拿大)
Ifconfig 从第一个服务器输出此信息
as0t0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:172.27.224.1 P-t-P:172.27.224.1 Mask:255.255.252.0
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:200
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
as0t1 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:172.27.228.1 P-t-P:172.27.228.1 Mask:255.255.252.0
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:200
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
as0t2 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:172.27.232.1 P-t-P:172.27.232.1 Mask:255.255.252.0
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:5156 errors:0 dropped:0 overruns:0 frame:0
TX packets:5046 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:200
RX bytes:1043681 (1.0 MB) TX bytes:2859456 (2.8 MB)
as0t3 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:172.27.236.1 P-t-P:172.27.236.1 Mask:255.255.252.0
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:200
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:1057 errors:0 dropped:0 overruns:0 frame:0
TX packets:1057 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:754492 (754.4 KB) TX bytes:754492 (754.4 KB)
tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:10.4.83.109 P-t-P:10.4.83.109 Mask:255.255.0.0
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:5 errors:0 dropped:0 overruns:0 frame:0
TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:705 (705.0 B) TX bytes:289 (289.0 B)
venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:127.0.0.2 P-t-P:127.0.0.2 Bcast:0.0.0.0 Mask:255.255.255.255
inet6 addr: 2a02:xxxx:xxxx:5485::1/128 Scope:Global
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
RX packets:84744 errors:0 dropped:0 overruns:0 frame:0
TX packets:64356 errors:0 dropped:7 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:107299933 (107.2 MB) TX bytes:9611579 (9.6 MB)
venet0:0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:XXXX P-t-P:XXXX Bcast:XXXX Mask:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
那么如何配置 iptable 或 openvps conf?我希望 VPN 服务器 1 中仍然可以监听端口 80。