Page MenuHomeVyOS Platform

Double quotes in openvpn-option
Closed, InvalidPublic

Description

options like --push in openvpn requires quotes
example:

--push "redirect-private local"

but the vyos command
set interfaces openvpn vtun0 openvpn-option OPTIONS
does not permit to use double quotes!

example:
set interfaces openvpn vtun0 openvpn-option "--push "redirect-private local""
and escape sequences, like \" or \' , are not admitted...
please can you fix it? I need of "redirect-private" option...

Details

Difficulty level
Easy (less than an hour)

Event Timeline

syncer closed this task as Wontfix.Dec 14 2016, 4:36 PM
syncer claimed this task.
syncer edited projects, added VyOS 1.1.x; removed VyOS 2.0.x, VyOS 1.1.x (1.1.8).
syncer added a subscriber: syncer.

It works perfectly without double quotes

openvpn vtun0 {
        local-port 443
        mode server
        openvpn-option "--push redirect-gateway def1"
        protocol tcp-passive
        server {
            name-server 8.8.8.8
            push-route 0.0.0.0/0
            subnet 192.168.255.0/24
        }
oliveriandrea reopened this task as Open.Dec 14 2016, 10:11 PM

no, here we have "double (double quotes)"

set interfaces openvpn vtun0 openvpn-option "--push "redirect-private local""

we have 4 double quotes!

So, I don't see an issue - don't use double quotes
you perfectly fine to specify several openvpn-option statements

@oliveriandrea what happens when you use double-quotes for vyos-config and single-quotes for the statement within? Can you also test out the other possible combinations; eg. "--with-escaping-the \"inner quotes\""; this is just for reference (I agree with @syncer recommendations for now). I would be especially interested in if they are treated differently by the tab-completion feature as IIRC it generates somewhat broken suggestions (vyos@vyos #delete openvpn-opt<tab> .. ).

syncer removed syncer as the assignee of this task.Dec 23 2016, 9:00 AM
syncer closed this task as Invalid.Aug 21 2017, 2:22 AM

No additional information was provided

syncer edited projects, added Invalid; removed VyOS 1.1.x.Oct 15 2018, 5:45 AM