https://github.com/ekristen/docker-openvpn-client
OpenVPN Client for Docker
https://github.com/ekristen/docker-openvpn-client
docker openvpn openvpn-client
Last synced: 9 months ago
JSON representation
OpenVPN Client for Docker
- Host: GitHub
- URL: https://github.com/ekristen/docker-openvpn-client
- Owner: ekristen
- Created: 2016-03-01T00:01:31.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2020-06-29T22:04:02.000Z (about 6 years ago)
- Last Synced: 2025-01-13T07:47:07.348Z (over 1 year ago)
- Topics: docker, openvpn, openvpn-client
- Homepage:
- Size: 1.95 KB
- Stars: 42
- Watchers: 4
- Forks: 40
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Docker OpenVPN Client
Original idea borrowed from https://github.com/dperson/openvpn-client
1. You should add the generated openvpn client config to a directory, you can call it client.ovpn
2. You should add the password for the private key in the `client.ovpn` to `client.pwd`
3. Run the following, I recommend adding `--auth-nocache`
```
docker run -d --name vpn-client \
--cap-add=NET_ADMIN \
--device /dev/net/tun \
-v /path/with/vpn/configs:/vpn \
ekristen/openvpn-client --config /vpn/client.conf --askpass /vpn/client.pwd --auth-nocache
```
### Route container traffic
Use `--net=container:` -- routes available by the VPN client will be made available to the container.
```
docker run -it --rm \
--net=container:vpn-client
ubuntu /bin/bash
```