how to set up a vpn using an imediary cloud-server
Karl Auer
kauer at biplane.com.au
Mon Oct 4 11:42:38 UTC 2021
On Mon, 2021-10-04 at 11:45 +0200, robert rottermann wrote:
> localhost -> imediary(cloud) -> destination
> [...]
> rsync user at destination:file.xx .
> [...]
> I can not access the destination directly, as I am using a dynamic
> IP. destination needs to know my IP beforehand to allow access.
There are several ways to achieve this.
The first and most obvious way is to get a static IP address from your
ISP.
Another way is to get an account on any of the many, many commercial
VPN providers. As you don't care about security and are really just
wanting a stable IP address, just choose any VPN provider that will
give you a stable IP address.
Another is to set up your own VPN server in (e.g.) AWS.
For this specific use case - rsync - you don't actually need a full-on
VPN. Any system, anywhere that will let you log in with ssh will
generally let you let you proxy through it (see below), and with the
right .ssh/config entry your rsync command will look pretty much the
same.
If you don't already have access via ssh to a suitable system, you can
have one from AWS for free as long as you are not shifting overly large
amounts of data.
With an ssh server you can log into, then if you are user1 at destination
and user2 on your AWS server 1.2.3., you would set up stanzas in
.ssh/config like this:
Host dest
ProxyCommand ssh sshserver -W destination:22
User user1
IdentityFile /path/to/destination/private/key
Host sshserver
Hostname 1.2.3.4
User user2
IdentityFile /path/to/ssh/server/private/key
... after which you would be able to do "rsync dest:file ."
More or less, anyway.
command looks
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer (kauer at biplane.com.au)
http://www.biplane.com.au/kauer
GPG fingerprint: 61A0 99A9 8823 3A75 871E 5D90 BADB B237 260C 9C58
Old fingerprint: 2561 E9EC D868 E73C 8AF1 49CF EE50 4B1D CCA1 5170
More information about the ubuntu-users
mailing list