how to set up a vpn using an imediary cloud-server
Bo Berglund
bo.berglund at gmail.com
Tue Oct 5 21:29:30 UTC 2021
On Mon, 4 Oct 2021 11:45:01 +0200, robert rottermann <robert at redcor.ch> wrote:
>I would like to set up a vpn to a server I have only indirect access trough a
>server in the cloud like so:
>
>localhost -> imediary(cloud) -> destination
>
>I then would like to do something like:
>
>rsync user at destination:file.xx .
>
>and vice versa.
>
>can you point me to some tutorial or some such.
>
>I can not access the destination directly, as I am using a dynamic IP.
>destination needs to know my IP beforehand to allow access.
I had a similar problem when I tried to connect to a system on a nobile
broadband LAN where the ISP would not provide a public IP address.
I needed to talk to a RaspberryPi device on that LAN and if it had been given a
public IP then I could have set up port forwarding.
Instead I did the following:
- I configured an RPi4 as an OpenVPN server located at home
- Port forwarded to it from my Internet router
- The public address of the router has a DynDNS entry so it is accessible
- On the remote system I set up a 24/7 connection to the OpenVPN server above
- Now to talk to it I only need to connect my own PC to the same OpenVPN server
- This is done through client-to-client communication in the tunnel
To make that work you have to know the tunnel IP address of the system you want
to talk to, but that is normally simple to get (or even define in the VPN server
configuration).
This has worked for me and now I can deploy the system I need access to wherever
I like, its whereabouts is of no concern since it connects by itself to the VPN
server.
--
Bo Berglund
Developer in Sweden
More information about the ubuntu-users
mailing list