Skip to content

Instantly share code, notes, and snippets.

@wvreeven
Last active November 15, 2021 10:30
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wvreeven/c7eb32f9c0a1eb8eb44bd412133d82bc to your computer and use it in GitHub Desktop.
Save wvreeven/c7eb32f9c0a1eb8eb44bd412133d82bc to your computer and use it in GitHub Desktop.
Set up VPN on ASIAir
If you are lucky enough to have a permanent set up with a mount, a telescope, a camera and an ASIAir then you
may wonder how to make sure that you can connect to the ASIAir remotely. With remotely I mean: while not being
connected to the same network as the ASIAir. For instance, you have your fixed setup in the backyard and you are
out having dinner at a friend's place and you notice that the sky is clear.
Arguably the most secure way to enable this is to use a VPN. Beware, however, that even a VPN connection may not
be safe depending on what VPN provider you use and what traffic is allowed over the connection. Therefore this
disclaimer:
I CANNOT BE HELD RESPONSIBLE FOR ANY SECURITY BREACH OR OTHER DAMAGE RESULTING FROM FOLLOWING THIS GUIDELINE!!!!
I am merely providing this guide to help you set up a VPN connection to your ASIAir. How you actually implement
all of this is your responsibility and not mine. There are many VPN providers out there and all have their pros
and cons. I have chosen ZeroTier VPN because it is free and flexible. I have been lucky enough not to have been
hacked (and this certainly is NOT an invitation for you to try to!!!) and should that happen to you after having
followed this guide then that will be your problem to deal with.
If you installed your ASIAir at a hosting location then you need to check with the hosting company first if it is
allowed to create a VPN connection!!!
OK, back to the guide.
In order to be able to use ZeroTier VPN, you will need to sign up and create and account. Then you need to create
a network that your clients can connect to. Full instructions can be found on
https://zerotier.com/
In order to install VPN client software on the ASIAir, you'll need to be able to create an openssh connection to
it. Details for how to do that can be found here:
https://gist.github.com/wvreeven/05bac7b5682a946cd7b9c3192db70746
It also helps if the ASIAir has a fixed IP address but this is not mandatory since ZeroTier VPN always assigns
the same IP address to a given client. If you would like to give your ASIAir a fixed ethernet (not WIFI) IP address
then have a look at this guide:
https://gist.github.com/wvreeven/2ba0d935d46c2068ad9c85ce17e12478
Once you have established the openssh connection to the ASIAir, you'll need to download and install the ZeroTier
VPN client. Before you can do that, you need to remount the root partition with write permissions because the root
partition gets mounted read only as soon as ASIAir has booted! To do so, issue
sudo mount -o remount,rw /
Once done, you need to become root due to the commands involved. I'd like to repeat at this stage that in general it
is unwise to execute commands as root user since you have full admin rights on the entire OS. So proceed with great
caution. And once again, any damage that happens is your own responsibility!
To become root, issue:
sudo su -
Then install the ZeroTier VPN client as follows:
curl -s https://install.zerotier.com | bash
Follow the instructions until the installation is complete. Finally, make the ASIAir join your ZeroTier network by issuing
zerotier-cli join <network ID>
Now you can start the ZeroTier app on your mobile device and then the ASIAir app on the same mobile device. The
ZeroTier web interface for your network will tell you what the ZeroTier VPN of ASIAir is so use that to connect the
ASIAir app to. Enjoy!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment