I have 2 servers:
server A: Public IP --> 104.x.x.x
server B: Public IP --> 188.x.x.x
server A has 2 VPN servers:
Openvpn --> tun0
Wireguard --> wg0
tun0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500
inet 10.8.0.1 netmask 255.255.255.0 destination 10.8.0.1
inet6 fe80::ae7d:f7ab:615b:a78a prefixlen 64 scopeid 0x20<link>
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 100 (UNSPEC)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 4 bytes 304 (304.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wg0: flags=209<UP,POINTOPOINT,RUNNING,NOARP> mtu 1420
inet 10.9.0.1 netmask 255.255.255.0 destination 10.9.0.1
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 1000 (UNSPEC)
RX packets 22563 bytes 14268224 (14.2 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 20017 bytes 15166196 (15.1 MB)
TX errors 0 dropped 6 overruns 0 carrier 0 collisions 0
I want that if any clients connect to openvpn or wireguard, instead of connecting to internet from server A, use server B internet connction
Clients (Openvpn or wireguard)
--> Server A
--> Server B
--> Connect to internet
How can I make in possible? (using ssh or other way to forward traffic from server A to server B)
Thank you,
Best regards