Using the docker-compose.yml below as a template, replace the webapp section with your application.
Follow the setup guide here: https://github.com/kylemanna/docker-openvpn
Afterwards we'll want to modify the VPN config so that it points to our local DNS proxy.
Edit openvpn-data/conf/openvpn.conf, replacing everything after ### Push Configurations Below:
### Push Configurations Below
push "block-outside-dns"
push "dhcp-option DNS 172.22.0.100"
push "route 172.22.0.0 255.255.255.0"
push "comp-lzo no"
### Extra Configurations Below
topology subnetWe need to allow access to the host and from the VPN connections to the docker network:
$ iptables -A FORWARD -i tun+ -j ACCEPT
$ ip route add 192.168.255.0/24 via 172.22.101
$ ufw allow 1194/udpUsing the OpenVPN client apps for iOS, Android, Windows, Linux, or MacOS you can connect using the .ovpn file you generated during the OpenVPN setup.
Once connected to the VPN you should be able to access http://webapp.docker