I would like to forward all traffic from a server (Linux) to another server (Linux) without losing ssh access to first server. Authorities (government) have been shutting down the Internet, we have a hard time accessing outside of the country's Internet.
I have configured Server B with OpenConnect Server and I can connect successfully from local to Server B
Local Machine === (via vpn) ===> Server B
But sometimes Server B is not reachable form local and I only can access it from Server A (only thought A to B)
Local Machine === (ssh) ===> Server A === (ssh) ===> Server B
Here is the workflow I try to get it right in order to redirect (or forward) all traffic from Server A to Server B
Local Machine === (via vpn) ===> Server A === (via vpn) ===> Server B
So I can connect from local to Server B, while Server A is a helper and
- it is a OpenConnect server (so I can connect from local to this)
- all traffic is forwarded to Server B (via opencoonect client)
- I can SSH to Server A to manage it (which is is connected to Server B)
I try to use OpenConnect client to make a connection from Server A to Server B.
And I know this operation cuts my SSH connectivity and Server B incoming traffic.
Question 1. Is it possible using OpenConnect to solve this issue or no, another solution like using a MicroTik is better, or turning Server A into a router ...
Question 2. if using OpenCoonect can get it done, how to configure Server A?
I have tried some ip
command as well as iptables
on Server A, but did not work.
Server A (VM, Debian 11)
- has public IP address (inside my country)
- has only one interface (eth0)
Server B (VM, Ubuntu 20)
- has public IP address (outside of my country)
- has only one interface (eth0)
- is an OpenCooenct Server
Regards.