Created
January 5, 2017 14:53
-
-
Save g00cey/4750f6851db627a82cd018d98ded2416 to your computer and use it in GitHub Desktop.
docker openvpn
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
version: "2" | |
services: | |
openvpn: | |
image: kylemanna/openvpn | |
volumes: | |
- "~/openvpn:/etc/openvpn" | |
ports: | |
- "9995:1194/udp" | |
cap_add: | |
- NET_ADMIN |
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 | |
if [ $# -eq 1 ]; then | |
docker-compose run --rm openvpn easyrsa build-client-full $1 nopass | |
docker-compose run --rm openvpn ovpn_getclient $1 > keys/$1.ovpn | |
else | |
echo 'plz set clientname' | |
fi |
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 | |
docker-compose run --rm openvpn ovpn_genconfig -u udp://tluna.mydns.jp | |
#docker-compose run --rm -it openvpn ovpn_initpki | |
docker-compose run --rm openvpn ovpn_initpki |
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 | |
docker-compose stop openvpn | |
docker-compose up -d openvpn |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment