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

Options error: unknown X.509 name type: /etc/openvpn/custom/name-prefix #2867

Open
7 of 8 tasks
ShakataGaNai opened this issue Jul 25, 2024 · 0 comments
Open
7 of 8 tasks

Comments

@ShakataGaNai
Copy link

Is there a pinned issue for this?

  • I have read the pinned issues and could not find my issue

Is there an existing or similar issue/discussion for this?

  • I have searched the existing issues
  • I have searched the existing discussions

Is there any comment in the documentation for this?

  • I have read the documentation, especially the FAQ and Troubleshooting parts

Is this related to a provider?

  • I have checked the provider repo for issues
  • My issue is NOT related to a provider

Are you using the latest release?

  • I am using the latest release

Have you tried using the dev branch latest?

  • I have tried using dev branch

Docker run config used

docker run --name=transmission
--cap-add=NET_ADMIN
-v /z/transmission:/data
-v /z/transmission-config:/config
-v /etc/localtime:/etc/localtime:ro
--security-opt seccomp=unconfined
-e "OPENVPN_PROVIDER=IVPN"
-e "OPENVPN_CONFIG=Canada-Toronto"
-e "OPENVPN_USERNAME=CREDredactedCRED"
-e "OPENVPN_PASSWORD=CREDredactedCRED"
-e "CREATE_TUN_DEVICE=true"
-e "DEBUG=true"
-e "TRANSMISSION_RATIO_LIMIT=1"
-e "TRANSMISSION_RATIO_LIMIT_ENABLED=true"
-e "TRANSMISSION_DOWNLOAD_DIR=/data/complete"
-e "TRANSMISSION_SPEED_LIMIT_UP=512"
-e "TRANSMISSION_SPEED_LIMIT_UP_ENABLED=true"
-e "TRANSMISSION_PEER_PORT=40078"
-e "LOCAL_NETWORK=123.123.123.0/24"
-e PGID=1000 -e PUID=1000
-p 9091:9091
--restart=always
-d haugene/transmission-openvpn:5.3.1

Current Behavior

Upon launch, the container fails out with the error message "Options error: unknown X.509 name type: /etc/openvpn/custom/name-prefix"

The problem is that the startup script seems to be changing the provider ovpn file from:
verify-x509-name ca name-prefix (which is correct)
to:
verify-x509-name ca /etc/openvpn/ivpn/name-prefix

Expected Behavior

It should not modify this line in the file.

How have you tried to solve the problem?

I've grabbed the config, and manually modified it (then set to read-only) to remove the offending change and it started successfully

Log output

  • [[ -n 07f5a2b ]]
  • echo 'Starting container with revision: 07f5a2b'
    Starting container with revision: 07f5a2b
  • echo 'TRANSMISSION_HOME is currently set to: /config/transmission-home'
    TRANSMISSION_HOME is currently set to: /config/transmission-home
  • [[ /config != /\c\o\n\f\i\g ]]
  • '[' -d /data/transmission-home ']'
  • [[ -x /scripts/openvpn-pre-start.sh ]]
  • compgen -e
  • grep -q OVERRIDE_DNS
  • nslookup google.com
  • [[ true == \t\r\u\e ]]
  • echo 'Creating TUN device /dev/net/tun'
    Creating TUN device /dev/net/tun
  • rm -f /dev/net/tun
  • mkdir -p /dev/net
  • mknod /dev/net/tun c 10 200
  • chmod 0666 /dev/net/tun
  • VPN_PROVIDER=IVPN
  • export VPN_PROVIDER=ivpn
  • VPN_PROVIDER=ivpn
  • export VPN_PROVIDER_HOME=/etc/openvpn/ivpn
  • VPN_PROVIDER_HOME=/etc/openvpn/ivpn
  • mkdir -p /etc/openvpn/ivpn
  • [[ -z '' ]]
  • [[ IVPN == **\N\o\n\e** ]]
  • [[ -z IVPN ]]
  • echo 'Using OpenVPN provider: IVPN'
    Using OpenVPN provider: IVPN
  • [[ ivpn == \c\u\s\t\o\m ]]
  • [[ -n '' ]]
  • [[ -z '' ]]
  • VPN_CONFIG_SOURCE=auto
  • VPN_CONFIG_SOURCE=auto
  • echo 'Running with VPN_CONFIG_SOURCE auto'
    Running with VPN_CONFIG_SOURCE auto
  • [[ auto == \a\u\t\o ]]
  • [[ -f /etc/openvpn/ivpn/configure-openvpn.sh ]]
  • [[ ivpn == \c\u\s\t\o\m ]]
  • echo 'No bundled config script found for IVPN. Defaulting to external config'
    No bundled config script found for IVPN. Defaulting to external config
  • VPN_CONFIG_SOURCE=external
  • [[ external == \e\x\t\e\r\n\a\l ]]
  • [[ ivpn != \c\u\s\t\o\m ]]
  • ./etc/openvpn/fetch-external-configs.sh
  • VPN_CONFIG_SOURCE_TYPE=github_clone
  • GITHUB_CONFIG_SOURCE_REPO=haugene/vpn-configs-contrib
  • GITHUB_CONFIG_SOURCE_REVISION=main
  • [[ github_clone == \g\i\t\h\u\b_\z\i\p ]]
  • [[ github_clone == \g\i\t\h\u\b_\c\l\o\n\e ]]
  • GITHUB_CONFIG_REPO_URL=https://github.com/haugene/vpn-configs-contrib.git
  • config_repo=/config/vpn-configs-contrib
  • git config --global --add safe.directory /config/vpn-configs-contrib
  • echo 'Will get configs from https://github.com/haugene/vpn-configs-contrib.git'
    Will get configs from https://github.com/haugene/vpn-configs-contrib.git
  • [[ -d /config/vpn-configs-contrib ]]
    ++ git -C /config/vpn-configs-contrib remote -v
    ++ head -1
    ++ awk '{print $2}'
    ++ sed -e 's/https://github.com///' -e s/.git//
  • GITHUB_CONFIG_SOURCE_LOCAL=haugene/vpn-configs-contrib
  • '[' haugene/vpn-configs-contrib == haugene/vpn-configs-contrib ']'
  • echo 'Repository is already cloned, checking for update'
    Repository is already cloned, checking for update
  • git -C /config/vpn-configs-contrib pull
    Already up to date.
  • git -C /config/vpn-configs-contrib checkout main
    Already on 'main'
    Your branch is up to date with 'origin/main'.
    ++ find /config/vpn-configs-contrib/openvpn -type d -name ivpn
  • provider_configs=/config/vpn-configs-contrib/openvpn/ivpn
  • [[ -z /config/vpn-configs-contrib/openvpn/ivpn ]]
  • echo 'Found configs for IVPN in /config/vpn-configs-contrib/openvpn/ivpn, will replace current content in /etc/openvpn/ivpn'
    Found configs for IVPN in /config/vpn-configs-contrib/openvpn/ivpn, will replace current content in /etc/openvpn/ivpn
  • rm -r /etc/openvpn/ivpn
  • cp -r /config/vpn-configs-contrib/openvpn/ivpn /etc/openvpn/ivpn
  • exit 0
  • [[ -f /etc/openvpn/ivpn/configure-openvpn.sh ]]
  • [[ -z '' ]]
  • [[ -n Canada-Toronto ]]
  • '[' -e /data/openvpn/OPENVPN_CONFIG ']'
  • readarray -t OPENVPN_CONFIG_ARRAY
  • for i in "${!OPENVPN_CONFIG_ARRAY[@]}"
  • OPENVPN_CONFIG_ARRAY[${i}]=Canada-Toronto
  • OPENVPN_CONFIG_ARRAY[${i}]=Canada-Toronto
  • (( 1 > 1 ))
  • [[ -f /etc/openvpn/ivpn/Canada-Toronto.ovpn ]]
  • echo 'Starting OpenVPN using config Canada-Toronto.ovpn'
    Starting OpenVPN using config Canada-Toronto.ovpn
  • CHOSEN_OPENVPN_CONFIG=/etc/openvpn/ivpn/Canada-Toronto.ovpn
  • mountpoint -q /etc/openvpn/ivpn/Canada-Toronto.ovpn
  • MODIFY_CHOSEN_CONFIG=true
  • [[ true == \t\r\u\e ]]
  • /etc/openvpn/modify-openvpn-config.sh /etc/openvpn/ivpn/Canada-Toronto.ovpn
  • '[' 1 -ne 1 ']'
  • CONFIG=/etc/openvpn/ivpn/Canada-Toronto.ovpn
  • echo 'Modifying /etc/openvpn/ivpn/Canada-Toronto.ovpn for best behaviour in this container'
    Modifying /etc/openvpn/ivpn/Canada-Toronto.ovpn for best behaviour in this container
  • CONFIG_MOD_USERPASS=1
  • CONFIG_MOD_CA_CERTS=1
  • CONFIG_MOD_PING=1
  • CONFIG_MOD_RESOLV_RETRY=1
  • CONFIG_MOD_TLS_CERTS=1
  • CONFIG_MOD_VERBOSITY=3
  • CONFIG_MOD_REMAP_USR1=1
  • CONFIG_MOD_FAILURE_SCRIPT=1
  • [[ 1 == \1 ]]
  • echo 'Modification: Point auth-user-pass option to the username/password file'
    Modification: Point auth-user-pass option to the username/password file
  • sed -i 's#auth-user-pass.*#auth-user-pass /config/openvpn-credentials.txt#g' /etc/openvpn/ivpn/Canada-Toronto.ovpn
  • [[ 1 == \1 ]]
  • echo 'Modification: Change ca certificate path'
    Modification: Change ca certificate path
    ++ dirname /etc/openvpn/ivpn/Canada-Toronto.ovpn
  • config_directory=/etc/openvpn/ivpn
  • sed -i -E 's#ca\s+(./)#ca /etc/openvpn/ivpn/#g' /etc/openvpn/ivpn/Canada-Toronto.ovpn
  • [[ 1 == \1 ]]
  • echo 'Modification: Change ping options'
    Modification: Change ping options
  • sed -i '/^inactive.*$/d' /etc/openvpn/ivpn/Canada-Toronto.ovpn
  • sed -i '/^ping.*$/d' /etc/openvpn/ivpn/Canada-Toronto.ovpn
  • sed -i '/^keepalive.*$/d' /etc/openvpn/ivpn/Canada-Toronto.ovpn
  • sed -i '$q' /etc/openvpn/ivpn/Canada-Toronto.ovpn
  • echo 'inactive 3600'
  • echo 'ping 10'
  • echo 'ping-exit 60'
  • [[ 1 == \1 ]]
  • echo 'Modification: Update/set resolv-retry to 15 seconds'
    Modification: Update/set resolv-retry to 15 seconds
  • sed -i '/^resolv-retry.*$/d' /etc/openvpn/ivpn/Canada-Toronto.ovpn
  • sed -i '$q' /etc/openvpn/ivpn/Canada-Toronto.ovpn
  • echo 'resolv-retry 15'
  • [[ 1 == \1 ]]
  • echo 'Modification: Change tls-crypt keyfile path'
    Modification: Change tls-crypt keyfile path
    ++ dirname /etc/openvpn/ivpn/Canada-Toronto.ovpn
  • config_directory=/etc/openvpn/ivpn
  • sed -i -E 's#tls-crypt\s+(./)#tls-crypt /etc/openvpn/ivpn/#g' /etc/openvpn/ivpn/Canada-Toronto.ovpn
  • [[ 3 -gt 0 ]]
  • [[ 3 -gt 9 ]]
  • echo 'Modification: Set output verbosity to 3'
    Modification: Set output verbosity to 3
  • sed -i '/^verb.*$/d' /etc/openvpn/ivpn/Canada-Toronto.ovpn
  • sed -i '$q' /etc/openvpn/ivpn/Canada-Toronto.ovpn
  • echo 'verb 3'
  • [[ 1 == \1 ]]
  • echo 'Modification: Remap SIGUSR1 signal to SIGTERM, avoid OpenVPN restart loop'
    Modification: Remap SIGUSR1 signal to SIGTERM, avoid OpenVPN restart loop
  • sed -i '/^remap-usr1.*$/d' /etc/openvpn/ivpn/Canada-Toronto.ovpn
  • sed -i '$q' /etc/openvpn/ivpn/Canada-Toronto.ovpn
  • echo 'remap-usr1 SIGTERM'
  • [[ 1 == \1 ]]
  • echo 'Modification: Updating status for config failure detection'
    Modification: Updating status for config failure detection
    ++ sed -n 's/^; status (.*)/\1/p' /etc/openvpn/ivpn/Canada-Toronto.ovpn
  • CONFIG_STATUS=
  • [[ '' == \u\n\k\n\o\w\n ]]
  • [[ '' != \f\a\i\l\u\r\e ]]
  • CONFIG_STATUS=unknown
  • sed -i '/^; status.*$/d' /etc/openvpn/ivpn/Canada-Toronto.ovpn
  • sed -i '$q' /etc/openvpn/ivpn/Canada-Toronto.ovpn
  • echo '; status unknown'
  • [[ unknown == \f\a\i\l\u\r\e ]]
  • [[ -x /scripts/openvpn-post-config.sh ]]
  • mkdir -p /config
  • [[ -f /run/secrets/openvpn_creds ]]
  • [[ CREDredactedCRED == **\N\o\n\e** ]]
  • [[ CREDredactedCRED == **\N\o\n\e** ]]
  • echo 'Setting OpenVPN credentials...'
    Setting OpenVPN credentials...
  • echo -e 'CREDredactedCRED\CREDredactedCRED'
  • chmod 600 /config/openvpn-credentials.txt
  • [[ -f /run/secrets/rpc_creds ]]
  • echo ''
  • echo ''
  • export CONFIG=/etc/openvpn/ivpn/Canada-Toronto.ovpn
  • CONFIG=/etc/openvpn/ivpn/Canada-Toronto.ovpn
  • python3 /etc/openvpn/persistEnvironment.py /etc/transmission/environment-variables.sh
  • TRANSMISSION_CONTROL_OPTS='--script-security 2 --route-up /etc/openvpn/tunnelUp.sh --route-pre-down /etc/openvpn/tunnelDown.sh'
  • [[ false == \t\r\u\e ]]
  • [[ -n '' ]]
  • [[ false == \t\r\u\e ]]
  • [[ -n '' ]]
  • [[ -x /scripts/routes-post-start.sh ]]
  • [[ false != \f\a\l\s\e ]]
  • exec openvpn --script-security 2 --route-up /etc/openvpn/tunnelUp.sh --route-pre-down /etc/openvpn/tunnelDown.sh --config /etc/openvpn/ivpn/Canada-Toronto.ovpn
    Options error: unknown X.509 name type: /etc/openvpn/ivpn/name-prefix
    Use --help for more information.

HW/SW Environment

Docker Version: 19.03.13

Anything else?

No response

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

1 participant