Jump to content
Not connected, Your IP: 3.128.171.192
Sign in to follow this  
bm9vbmUK

HowTo - Airvpn, Deluge, and Docker

Recommended Posts

Edit: Because this post continues to bring people to my github page, I'd like to make things a bit easier. I have pushed my images to Dockerhub, so you no longer need to build these images yourself. Unfortunately there are still a few manual steps. Here's a step-by-step to get this running:

 

1) You still need to install Docker and docker-compose as described below.

2) You need to grab two files from my repository. https://github.com/rahmnathan/docker/blob/master/deluge/docker-compose.yml and https://github.com/rahmnathan/docker/blob/master/deluge/airvpn/resolv.conf

3) In the docker-compose file that you grabbed, you need to set the USERNAME and PASSWORD environment variables to your AirVPN credentials.

4) In the docker-compose file that you grabbed, you need to update the 'volumes' section to point to the resolv.conf file that you grabbed. This file configures Air to use AirVpn's DNS servers. Normally this is automatic with eddie, but there are some issues in Docker that currently prevent this, so it needs to be mapped as a volume.

5) Run 'docker-compose up -d' in the directory of the docker-compose.yml file.

 

More often than not, the airvpn container stops at 'Ready' before AirVPN connects. I haven't resolved this yet, but if you toggle 'docker-compose down'/'docker-compose up -d' a few times, it eventually goes through. If anyone knows why this is happening, please let me know or submit a pull request against my repo and I'd be happy to merge it.

 

To expand on that, if anyone has any suggestions, I'd be happy to implement them or accept PRs.

 

---------------------

 

After several days of grind, I was finally able to get my vpn/deluge Docker swarm working properly. The goal of this was to create an isolated/portable environment to use my vpn so I could run it without changing the external IP of everything else running on the host system. Fair warning, I'm terrible at how-to's...

 

The first thing you'll want to do is install Docker and Docker Compose. I like DigitalOcean's guides for this..

 

Docker -> https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-16-04

Docker Compose -> https://www.digitalocean.com/community/tutorials/how-to-install-docker-compose-on-ubuntu-16-04

 

Now you can follow the instructions located here -> https://github.com/rahmnathan/docker

 

Brief Explanation:

 

vpn - This image downloads, configures, and runs Air's Eddie client. 

 

deluge - This image downloads, configures, and runs the Deluge deamon. This image will use the network of the 'vpn' container, which is completely locked down outside of the docker swarm unless it's through the vpn. That brings us to...

 

nginx - This image downloads, configures, and runs nginx. Because our swarm's network is isolated from the host's we need to utilize nginx as a reverse proxy to get into it. This is simply a gateway for us to access the Deluge daemon.

 

Hopefully that's enough information for anyone interested to get started. The cool thing about this is you can force any container through the vpn while leaving the host machine/other containers running outside of the vpn. This gives us a very scalable, portable, isolated way to use the awesome service provided by Air.

 

 

 

Feel free to ask questions and suggest edits. 

 

Thanks

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Security Check
    Play CAPTCHA Audio
    Refresh Image
Sign in to follow this  

×
×
  • Create New...