Networking [SOLVED]: OpenVPN error : Options error: Unrecognized option or missing or extra parameter

Networking [SOLVED]: OpenVPN error : Options error: Unrecognized option or missing or extra parameter

Home Forums Networking Networking [SOLVED]: OpenVPN error : Options error: Unrecognized option or missing or extra parameter

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #36370

    Anonymous

    QuestionQuestion

    I have a ovpn file with following format.

    client
    dev tun
    proto udp
    remote MY_IP 1194
    resolv-retry infinite
    nobind
    persist-key
    persist-tun
    mute-replay-warnings
    ns-cert-type server
    key-direction 1 
    cipher AES-128-CBC
    comp-lzo
    verb 1
    mute 20
    
    -----BEGIN CERTIFICATE-----
    M---DeletedContent
    +Jl7
    -----END CERTIFICATE-----
    
    
    -----BEGIN CERTIFICATE-----
    DeletedContentYsuN5d
    -----END CERTIFICATE-----
    
    
    -----BEGIN RSA PRIVATE KEY-----
    Proc-Type: 4,ENCRYPTED
    DEK-Info: DES-EDE3-CBC,EB9C4DDDD26848F5
    
    PDeletedContent
    -----END RSA PRIVATE KEY-----
    
    
    #
    # 2048 bit OpenVPN static key
    #
    -----BEGIN OpenVPN Static key V1-----
    DeletedContent
    -----END OpenVPN Static key V1-----
    

    When I am trying to open this with OVPN 2.4.4 getting following error:

    Options error: Unrecognized option or missing or extra parameter(s) in C:UsersStevensDesktopuser01.ovpn:17: —BEGIN (2.4.4)
    Use –help for more information.
    Press any key to continue…

    Line 17 is the 1st —–BEGIN CERTIFICATE—–. What am I doing wrong??

    #36371

    Anonymous

    Accepted AnswerAnswer

    You need to wrap your certs in suitable block directives, my similar file has this structure

    ...
    <ca>
    -----BEGIN CERTIFICATE-----
    ... 
    -----END CERTIFICATE-----
    </ca>
    <cert>
    -----BEGIN CERTIFICATE-----
    ... 
    -----END CERTIFICATE-----
    </cert>
    <key>
    -----BEGIN PRIVATE KEY-----
    ....
    -----END PRIVATE KEY-----
    </key>
    <tls-auth>
    #
    # 2048 bit OpenVPN static key
    #
    -----BEGIN OpenVPN Static key V1-----
    ...
    -----END OpenVPN Static key V1-----
    </tls-auth>
    

    Source: https://serverfault.com/questions/888215/openvpn-error-options-error-unrecognized-option-or-missing-or-extra-parameter
    Author: The time has come
    Creative Commons License
    This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.