Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue #132 #150

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@ COPY VERSION ./config

RUN apk add --no-cache openvpn easy-rsa bash netcat-openbsd zip dumb-init && \
mkdir -p ${APP_PERSIST_DIR} && \
cd ${APP_PERSIST_DIR} && \
/usr/share/easy-rsa/easyrsa init-pki && \
/usr/share/easy-rsa/easyrsa gen-dh && \
# DH parameters of size 2048 created at /usr/share/easy-rsa/pki/dh.pem
# Copy DH file
cp pki/dh.pem /etc/openvpn && \
# Copy FROM ./scripts/server/conf TO /etc/openvpn/server.conf in DockerFile
cd ${APP_INSTALL_PATH} && \
cp config/server.conf /etc/openvpn/server.conf
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ To run docker-openvpn with docker-compose run:
```bash
echo HOST_ADDR=$(curl -s https://api.ipify.org) > .env && \
docker-compose up -d && \
docker-compose exec -d dockovpn wget -O /doc/Dockovpn/client.ovpn localhost:8080
docker-compose exec -d dockovpn wget -O /opt/Dockovpn_data/client.ovpn localhost:8080
```

After run this command you can find your `client.ovpn` inside `openvpn_conf` folder.
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ services:
environment:
HOST_ADDR: ${HOST_ADDR}
volumes:
- ./openvpn_conf:/doc/Dockovpn
- ./openvpn_conf:/opt/Dockovpn_data
restart: always
5 changes: 4 additions & 1 deletion scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ LOCKFILE=.gen
# Regenerate certs only on the first start
if [ ! -f $LOCKFILE ]; then

/usr/share/easy-rsa/easyrsa init-pki
/usr/share/easy-rsa/easyrsa gen-dh
# DH parameters of size 2048 created at APP_PERSIST_DIR/pki/dh.pem
/usr/share/easy-rsa/easyrsa build-ca nopass << EOF

EOF
Expand Down Expand Up @@ -58,7 +61,7 @@ EOF4
fi

# Copy server keys and certificates
cp pki/ca.crt pki/issued/MyReq.crt pki/private/MyReq.key ta.key /etc/openvpn
cp pki/ca.crt pki/issued/MyReq.crt pki/private/MyReq.key ta.key pki/dh.pem /etc/openvpn

cd "$APP_INSTALL_PATH"

Expand Down