417 – Expectation Failed – OpenVPN tunnel

Home Forums Conduit: AEP Model 417 – Expectation Failed – OpenVPN tunnel

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #26716
    Stelios Pa
    Participant

    Hello I’m trying to add an OpenVPN tunnel to my gateway through API. I’m sending this:

    
    curl -k -X POST -H "Content-Type: application/json" -d '{ "name": "ItsMe", "description": "", "enabled": true, "type": "CLIENT", "config": "client
    proto tcp
    remote google.com 1194
    dev tun
    resolv-retry infinite
    nobind
    persist-key
    persist-tun
    remote-cert-tls server
    verify-x509-name server_3H name
    auth SHA256
    auth-nocache
    cipher AES-128-GCM
    tls-client
    tls-version-min 1.2
    tls-cipher TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256
    setenv opt block-outside-dns # Prevent Windows 10 DNS leak
    verb 3
    <ca>
    -----BEGIN CERTIFICATE-----
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    E2NuX0Zaak5qcjNDU1lCY05oZ2YwHhcNMTgxMTA1MTI1NzIwWhcNMjgxMTAyMTI1
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    AQYIKoZIzj0DAQcDQgAEn4VFnir3GoVj9tpRbRkrGm3ZeNP9IULZ6tSD686e+ajM
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    BwyitYsIXeI6Sun4JTfGEWODN84wTgYDVR0jBEcwRYAUBwyitYsIXeI6Sun4JTfG
    EWODN86hIqQgMB4xHDAaBgNVBAMME2NuX0Zaak5qcjNDU1lCY05oZ2aCCQCr6yec
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    AiAjIqPNCN8bwbHCuWpsgXf5Qo/Rq0W0cFkmnHTssne99QIgJ93GTtqgYUrOxGJ4
    RJjL1G6q4EIVaGrl8g0VswF3vTE=
    -----END CERTIFICATE-----
    </ca>
    " }' 127.0.0.1/api/ovpnTunnels
    

    and the response is Content-Type: text/html with status code 417 – Expectation Failed.

    If I remove 4-5 random lines from the request then I get 200 – OK.

    #26761
    Stelios Pa
    Participant

    Any thoughts?

    #26762
    Jason Reiss
    Keymaster

    Encode the newlines as \n in the config field.
    JSON does not support multiline strings.

    What does the request look like when 4-5 random lines are removed?

    #26849
    Stelios Pa
    Participant

    Thanks for the answer, I will try it.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.