Skip to content

Spawn multiple Honeygain instances all over the world from one machine!

License

Notifications You must be signed in to change notification settings

malmeloo/honeygain-ovpn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Honeygain-OVPN

Spawn multiple Honeygain instances all over the world from one machine!

But why?

Honeygain pays you more if you have multiple devices on many different IPs. So I thought, why not put my VPN to good use and deploy some clients worldwide? They still don't pay you much (~$9 per month in my case, running 8 containers and an android phone), but everything is deployed from a google cloud instance that costs me less than $1 per month. It requires very little maintenance other than the occasional reboot because my VPN provider disconnected one of my containers.

Screenshots

Can you see when I deployed the containers? image

The running containers from my Google cloud instance image

What the devices look like in my Honeygain dashboard image

How?

Honeygain provides an image that can be used to run a client on any machine that can run Docker. Releasing their client as a docker image has an interesting side effect: it allows you to run multiple instances of the client, all with independent networking capabilities.

What this project does is simple: it allows you to build a docker image that wraps around Honeygain's official image, installs and runs an OpenVPN client inside the container, and then runs the Honeygain client. This will make your container appear to Honeygain as if it's in a different country, using a different IP, while it's actually still running on your machine. All that without routing your main PC's internet through the tunnel, or affecting other client instances.

The caveats

There are some conditions that you will have to meet in order to use this project effectively.

First, according to their own blog post, you are not able to connect using IP ranges that are flaged as Data Center (DCH) or Reserved (RSV). Unfortunately, this is the case for most major VPN providers and VPS hosting services. To check if this affects you, try visiting https://www.ipinfodb.com/ and look at the "Usage Type" field.
Different VPN locations can have different IP types, so make sure to test all of them. You're usually better off installing your own VPN server on a remote device, or using a VPN provided by your institution as these are less likely to be flagged.

Second, Honeygain's "2 devices per IP" rule still applies, so make sure that your containers actually get assigned different IPs by checking the logs (the external IP is logged on every start). Again, institution VPNs are kind of perfect for this, as some of them actually assign you a dedicated IP from one of their pools! This essentially means that you can connect to the same location multiple times and get a new IP every time.

Okay, understood. Now how do I use this?

First, you should obtain OpenVPN configs for the different locations that you want to connect to. Most VPN providers already use OpenVPN under the hood, but not all of them allow you to actually obtain the config. Usually, you'll end up having multiple configuration files for every location (country) that you want to connect to.

Second, you're gonna have to build the image:

docker build . -t honeygain-ovpn

This will pull the latest official Honeygain client from DockerHub and build the honeygain-ovpn image, which can be used by all your containers.

After building the image, you can now start the manager container. This is a specially crafted container that will manage all your Honeygain clients for you. To start using it, first cd into the manager directory, and then execute the following command:

docker-compose up -d

The manager will now run automatically every 15 minutes, keeping your containers online and saving you effort. It will also claim your daily rewards without you having to do so yourself ;)

Configuring VPN connections

In order to actually run some containers, you will have to drop some OpenVPN configurations into the configs directory. The name of the file MUST be in the format config-<identifier>.ovpn (example: config-nl.ovpn.) The manager will notice your new (or removed) configuration, create a container called honeygain-<identifier>, and join your Honeygain account using the name DOCKER_<identifier>. If it notices that a configuration is missing, it will shut down the container for you; however, please note that it takes 2 weeks before Honeygain will let you add a new device under a different name. Therefore the manager will actively limit you to running 10 clients at once on your account.

Manually building / starting the image

Option Value Notes
Container Name honeygain-<country code> Can be anything you like, but should be recognizable.
Volume /path/to/config-<country code>.ovpn:/config.ovpn You should mount your OpenVPN config as a volume under /config.ovpn
Command -tou-accept -email <email> -pass <pass> -device DOCKER_<country code> "-device" flag can be anything you like, but again, make it recognizable.
Privileged true Necessary for OpenVPN to work
Sysctls net.ipv6.conf.all.disable_ipv6=0 IPv6 should be enabled (= set to 0), otherwise your VPN might not connect properly
Capabilities NET_ADMIN Necessary for OpenVPN to work
Restart unless-stopped Does not matter much for functionality, but you likely want your containers to keep running.

Example command:

docker run -d \
    --name "honeygain-nl" \
    -v "$(pwd)/configs/config-nl.ovpn:/config.ovpn" \
    --privileged \
    --sysctl "net.ipv6.conf.all.disable_ipv6=0" \
    --cap-add "NET_ADMIN" \
    --restart "unless-stopped" \
    honeygain-ovpn "-tou-accept -email my-email@ex.com -pass my-pass -device DOCKER_NL"

About

Spawn multiple Honeygain instances all over the world from one machine!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published