Skip to content
πŸ” Out of the box stateless openvpn-server docker image which starts in less than 2 seconds
Branch: master
Clone or download
alekslitvinenk Sandbox/feature/ovp 3 (#13)
* OVP-3 Generate server certificate at runtime

* Some minor fixes

* Update README.md

Fix typo

* Update README.md

Remove security warning and responsibility waver
Latest commit 95ab7d6 Jun 21, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config Get rid of the depricated comp-lzo option Jun 11, 2019
docs Add Beta image May 3, 2019
scripts
.dockerignore Add support of HOST_ADDR environment variable May 14, 2019
.gitignore
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md May 26, 2019
CONTRIBUTING.md Update CONTRIBUTING.md Jun 20, 2019
Dockerfile
LICENSE Create LICENSE May 26, 2019
README.md Sandbox/feature/ovp 3 (#13) Jun 21, 2019
build.sh Client setup at buildtime Apr 29, 2019
run.sh Cleaner logs in console Jun 8, 2019

README.md


πŸ”Docker-OpenVPN

Out of the box stateless openvpn server docker image which starts in a few seconds and doesn't require presistent storage.

GitHub repo:

https://github.com/alekslitvinenk/docker-openvpn

DockerHub repo:

https://hub.docker.com/r/alekslitvinenk/openvpn

Quick Start πŸš€

Prerequisites:

  1. Any phisical or vps server running Linux. You should have administrative rights on this machine.
  2. Docker installation on your server.
  3. Public ip address assigned to your server.

1. Run docker-openvpn

If you know which ip address was assigned to your server, pass it in environment variable:

docker run --privileged -it --rm --name dovpn -p 1194:1194/udp -p 8080:8080/tcp -e HOST_ADDR=<your_host_public_ip> alekslitvinenk/openvpn

If you don't know you server's ip adress, use the code below to launch you docker-openvpn:

docker run --privileged -it --rm --name dovpn -p 1194:1194/udp -p 8080:8080/tcp -e HOST_ADDR=$(curl -s https://api.ipify.org) alekslitvinenk/openvpn

ℹ️ Note: --privileged flag is required to do manipulations with iptables and to setup flag that allows trafic forwarding in sysctl.conf.
We will try to get rid of this flag in the future releases of docker-openvpn.

If everything went well, you should be able to see the following output in your console:

Sun Jun  9 08:56:11 2019 Initialization Sequence Completed
Sun Jun  9 08:56:12 2019 Client.ovpn file has been generated
Sun Jun  9 08:56:12 2019 Config server started, download your client.ovpn config at http://example.com:8080/
Sun Jun  9 08:56:12 2019 NOTE: After you download you client config, http server will be shut down!

2. Get client configuration

Now, as your docker-openvpn is up and running you can go to <your_host_public_ip>:8080 on your desktop or laptop and download your client configuration. As soon as you have your config file downloaded you will see the following output in the console:

Sun Jun  9 09:01:15 2019 Config http server has been shut down

Import client.ovpn into your favourite openvpn client. In most cases it should be enough to just doubleclick on that file.

3. Connect to your docker-openvpn container

You should be able to see your newly added client configuration in the list of available configurations. Click on it, connection process should initiate and be established withing few seconds.

Congratulations, now you're all set and can safely browse the internet.

Other resources

Contrubition Guidelines
Code Of Conduct
License Agreement

You can’t perform that action at this time.