File | Date | Author | Commit |
---|---|---|---|
.dockerignore | 2020-07-18 | jinbin | [e8081b] new project |
.gitignore | 2020-07-18 | jinbin | [e8081b] new project |
Dockerfile | 2020-07-18 | jinbin | [e8081b] new project |
LICENSE | 2020-07-18 | jinbin | [e8081b] new project |
README.md | 2020-07-18 | jinbin | [e8081b] new project |
ovpnd.sh | 2020-07-18 | jinbin | [e8081b] new project |
update.sh | 2020-07-18 | jinbin | [e8081b] new project |
Dockerfile for openvpn server, buile on Alpine linux.
Support easy list|create|delete client config
ovpnd is licensed under the Apache License, Version 2.0. See
LICENSE for the full
license text.
import:
* alpine linux
* openvpn
* easy-rsa
build
docker build --tag binave/ovpnd:2.4.9-alpine .
run
# run
docker run \
--detach \
--name openvpnd \
--restart always \
--cap-add NET_ADMIN \
--volume /opt/openvpn:/etc/openvpn \
--publish 1194:1194/udp \
binave/ovpnd:2.4.9-alpine ovpnd start -cn 10.0.1.2
user config
# list all user with create datetime
docker exec -t openvpnd ovpnd list
# get password, Recommended remeber and remove it
docker exec -t openvpnd cat $(docker logs openvpnd 2>&1 | awk -F \' '/pass phrase/{print $2}')
#'
# add user1 with password
docker exec -it openvpnd ovpnd add user1
# get user1 config
docker exec -t openvpnd ovpnd get user1 > user1.ovpn
# del user1 with password
docker exec -it openvpnd ovpnd del user1
help
docker exec -it openvpnd ovpnd --help
docker exec -it openvpnd ovpnd start --help
alias ovpnd
cat >> ~/.bash_profile <<EOF
alias ovpnd='docker exec -it openvpnd ovpnd'
EOF
env | description | default |
---|---|---|
OVER_CONF_D | config path | /etc/openvpn |
OVER_REQ_COUNTRY | rsa country | CN |
OVER_REQ_PROVINCE | rsa province | BEIJING |
OVER_REQ_CITY | rsa city | BEIJING |
OVER_REQ_ORG | rsa org | Copyleft Certificate Co |
OVER_REQ_EMAIL | rsa email | me@example.net |
OVER_REQ_OU | rsa organizational unit | My Organizational Unit |
OVER_CRL_DAYS | CRL expire days | 3650 |