This Dockerfile provides a base image for openvpn-as
This is a Linux only image, since it's functionality is based on the Use network host Docker functionality.
- openvpn-as 2.7.4
There are two constrains that must be fullfilled in the host for the server to start properly.
Check if the following kernel modules have been loaded
lsmod | grep tun
and
lsmod | grep tap
In case of missing modules run
modprobe tun tap
docker run -ti --network host --privileged --cap-add=NET_ADMIN -p 943:943 5thempire/openvpn bash
Use network host and verify all the network devices are available. NET_ADMIN should provide access to iptables inside the container.
ifconfig
Configure openvpn-as webui
sh /usr/local/openvpn_as/bin/ovpn-init
Assuming you've chosen all interfaces and the port 943, you should have been provided with a link similar to the following http://192.168.0.10:943/admin
.
Set a password for your openvpn docker user
passwd openvpn
Visit the link, the user is openvpn and the password is the one you've just provided.