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

ccd config error when save #24

Closed
jducifuentes opened this issue Jun 14, 2021 · 2 comments
Closed

ccd config error when save #24

jducifuentes opened this issue Jun 14, 2021 · 2 comments

Comments

@jducifuentes
Copy link

jducifuentes commented Jun 14, 2021

I've found a issue when adding custom options per client. I got the error:

Ccd for user ....... apply failed

my docker-compose.yaml file is :

version: '3'

services:
  openvpn:
    build:
      context: .
      dockerfile: Dockerfile.openvpn
    image: openvpn:local
    command: /etc/openvpn/setup/configure.sh
    cap_add:
      - NET_ADMIN
    ports:
      - 7777:1194 # for openvpn
      - 8080:8080 # for ovpn-admin because of network_mode
      - 5555:5555 # for management      
    volumes:
      - ./easyrsa_master:/etc/openvpn/easyrsa
      - ./ccd_master:/etc/openvpn/ccd
  ovpn-admin:
    build:
      context: .
    image: ovpn-admin:local
    command: /app/ovpn-admin --debug --ovpn.network="192.168.30.0/24" --master.sync-token="TOKEN" --easyrsa.path="/mnt/easyrsa" --easyrsa.index-path="/mnt/easyrsa/pki/index.txt" --ovpn.server="192.168.5.99:7777:tcp" --auth.password --auth.db="./easyrsa/pki/users.db" --ccd --ccd.path="./ccd"
    network_mode: service:openvpn
    volumes:
      - ./easyrsa_master:/mnt/easyrsa
      - ./ccd_master:/mnt/ccd

Don't know how to debug app output... only I have are logs from docker logs:

openssl x509 -in /mnt/easyrsa/pki/ca.crt -noout -enddate | awk -F "=" {'print $2'}

@pashcovich
Copy link
Contributor

i think you need to change ovpn-admin start command to

/app/ovpn-admin --debug --ovpn.network="192.168.30.0/24" --master.sync-token="TOKEN" --easyrsa.path="/mnt/easyrsa" --easyrsa.index-path="/mnt/easyrsa/pki/index.txt" --ovpn.server="192.168.5.99:7777:tcp" --auth.password --auth.db="/mnt/easyrsa/pki/users.db" --ccd --ccd.path="/mnt/ccd"````

@jducifuentes
Copy link
Author

yessss, thanks a lot!, working flawlessly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants