Maintainable Alpine-based OpenVPN client for Docker.
1.0K
Maintainable Alpine-based OpenVPN client for Docker.
This image is automatically rebuilt every week to include the latest security patches from the Alpine community. You can view the detailed vulnerability reports in the GitHub Security Tab.
linux/amd64, linux/arm64tinisu-execshadow suite and sg tool with the lightweight su-exec.This image is ideal for routing traffic from other containers through a VPN tunnel.
services:
vpn:
image: anonymouz/openvpn-client
container_name: vpn
cap_add:
- NET_ADMIN
devices:
- /dev/net/tun:/dev/net/tun
volumes:
- ./client.ovpn:/vpn/config.ovpn:ro
restart: always
webapp:
image: nginx
network_mode: "service:vpn"
depends_on:
- vpn
ROUTE: Add custom routes (e.g., -e ROUTE="192.168.31.0/24").DNS: Set custom DNS servers (e.g., -e DNS="1.1.1.1").To ignore the default gateway pushed by the server and use specific routes instead, you can pass the -f flag (equivalent to route-nopull):
docker run -it --cap-add=NET_ADMIN --device /dev/net/tun \
-v $(pwd)/client.ovpn:/vpn/config.ovpn:ro \
anonymouz/openvpn-client -f -r "192.168.31.0/24"
If you encounter issues with connectivity, ensure:
--cap-add=NET_ADMIN flag is present./dev/net/tun device is mapped..ovpn file is named config.ovpn inside the /vpn volume (or correctly pointed to).Feel free to open issues or pull requests at the GitHub Repository.
Content type
Image
Digest
sha256:686823fca…
Size
8.3 MB
Last updated
4 months ago
docker pull anonymouz/openvpn-client