Revision [5175]
This is an old revision of OpenVPNDocker made by ZorrUno on 2020-02-09 08:10:48.
OpenVPNSetup with Docker
Using information from: https://hub.docker.com/r/linuxserver/openvpn-as/
Note this the web setup is non-free and allows two clients only (unless paid). OpenVPN itself is free however.
Get the container up
Use this docker-compose.ymlPut the right details for your mapped docker storage in the volumes section
version: "2" services: openvpn-as: image: linuxserver/openvpn-as container_name: openvpn-as cap_add: - NET_ADMIN environment: - TZ=Pacific/Auckland volumes: - /dockervolumes/openvpn-as:/config ports: - 943:943 - 9443:9443 - 1194:1194/udp restart: unless-stopped
run
docker-compose up -d
Set up the web interface
Probably set up the security before port forwarding. Go to https://ipaddressofserver:943/adminDefault username/pass is admin/password
Go into the User Permissions menu on the left
Create a new user and give it Admin permissions. Save Settings.
Click 'More Settings' for the Admin user, and give it a password.
Go down to access control (Use NAT should be set) and give the networks you want to the user to be able to access when connected, eg 192.168.1.0/24 (add multiple subnets one below the other)
Other (Optional)
You can set network addressing in Configuration/VPN Settings menu.
You can choose how DNS service is allocated in Configuration/VPN Settings menu
You can set default routing, rather than user specific settings in Configuration/VPN Settings menu
Do some port forwarding in your router
Forward these ports in your router to your server running docker. Note that 943 is the web interface - you will need to forward this and expose the this to the outside world to get the clients up and running, but can then turn it off.Forward
1194:UDP
9443:TCP
943:TCP
Set up the web interface
--
CategoryMicrocontrol
CategoryHomeAutomation
CategoryRaspberryPi
CategoryLinux