This container will auto-build and then auto-run every time you start Docker.
The container allows the host macOS/Windows system to access all containers directly
using the 172.17.0.0/24
IP addresses. This makes it possible to run a client application
on your macOS/Windows system and connect to the cluster that is running in the containers
(deployed in Docker using AeroLab).
- Use the
docker ps
command to check that no other Docker containers are running. - Run the following commands from the terminal command line:
git clone https://github.com/aerospike/aerolab
cd aerolab/tunnel-container-openvpn/build-run
chmod 755 *sh && ./RUNME.sh
- Download Tunnelblick, install and start it.
- From the taskbar menu, click on
VPN Details
. - In the Finder, navigate to the
aerolab/tunnel-container-openvpn/build-run/keys
directory. - Drag and drop the file
client.conf
to theConfigurations
pane of the Tunnelblick window. - Choose either
Only Me
orAll Users
. - Close the Tunnelblick window.
- Download OpenVPN Connect, install and start it.
- Click the Plus button.
- Click
Import from file
. - Rename
aerolab/tunnel-container-openvpn/build-run/keys/client.conf
toaerolab/tunnel-container-openvpn/build-run/keys/client.ovpn
. - Drag and drop the file
aerolab/tunnel-container-openvpn/build-run/keys/client.ovpn
into the OpenVPN window and clickAdd
. - Save and close the window.
Once Docker is started on macOS/Windows, click on the OpenVPN Connect
or Tunnelblick
icon
in the taskbar, and click Connect
.
NOTE: on first run you may get two warnings, one about DNS not changing and one about IPs
not changing. This is normal, as we are not tunneling anything apart from/to Docker traffic.
Click on Do not warn ...
on both warning windows and click OK
.
This procedure installs OpenVPN Server (with all the bells and whistles of
configuration), generates CA/server/client certificates and exports the certificates to
the host machine. The server configuration has a route to force the Docker IP address range of
172.17.0.0/16
to go through this VPN tunnel. Tunnelblick and OpenVPN Connect are GUIs
for OpenVPN, allowing you to connect to the OpenVPN server in a container from the OpenVPN
client on your host machine and allowing a 172.17.0.0/16
route to traverse through.