Last active
December 17, 2021 19:04
-
-
Save red-avtovo/b37161ac0832a2533193fb95bc4ef614 to your computer and use it in GitHub Desktop.
Script to connect docker machine to pritunl VPN server fast
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# download a file https://pritunl-host/key/kUcPewwukHSXxONlf9NJq7KdcUsMuRwR.tar | |
echo "Enter url to tar with profile:" | |
read tar_url | |
mkdir vpn | |
wget -O- ${tar_url} | tar x -C vpn | |
docker run -d \ | |
--net=host \ | |
--privileged \ | |
--name ovpn \ | |
-v $PWD/vpn:/vpn \ | |
--restart unless-stopped \ | |
dperson/openvpn-client -D -d | |
#--cap-add=NET_ADMIN \ | |
#--device /dev/net/tun \ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment