I have tried with an equivalent solution that has two requirements: I need an external machine ('bridge' machine) and I have to create a ssh tunnel in the client. Assuming we can do that, I only have to do:
On the VPN server (in a cg-nat network or behind a firewall):
Code: Select all
ssh -N -g -R 1200:localhost:1194 <my_bridge_machine_ip>
Code: Select all
ssh -N -L 1200:localhost:1200 <my_bridge_machine_ip>
This design seems to work; according to the logs, they connect themselves, and even the client receives an IP address from the VPN server (10.3.0.6).
But it cannot connect anywhere, I cannot even ping the vpn server (using its vpn address: 10.3.0.1) ...
To check if there are errors in the VPN configuration, I have tried the direct connection:
My network has dedicated IP, so I do not need this design; I con connect vpn client and server directly.
So, preserving all the same configuration files, but changing the vpn server and port on the client machine (it connects to the internet using a mobile connection, independent of my LAN where the VPN server is connected to), I have repeated the test.
In such case, the connection works perfectly
So, something is wrong or it lacks something I have not considered
If relevant or interesting for somebody, I can send logs