openvpn-option allows to add if any options are missing in the CLI node. Sometimes option lines in the generated OpenVPN configuration require quotes. This is done previously through a hack using config generator. You can pass quotes using the " statement.
set interfaces openvpn vtun20 openvpn-option ‘push "keepalive 1 10"’
Which will add push "keepalive 1 10" to the generated OpenVPN config file but when tested in 1.4.0 version it is not converting to quotes and receives an error.
Jun 25 12:25:18 openvpn-vtun20[1438609]: Options error: Unrecognized option or missing or extra parameter(s) in [CMD-LINE]:1: push (2.6.3) Jun 25 12:25:18 openvpn-vtun20[1438609]: Use --help for more information. Jun 25 12:25:18 systemd[1]: [email protected]: Main process exited, code=exited, status=1/FAILURE Jun 25 12:25:18 systemd[1]: [email protected]: Failed with result 'exit-code'. Jun 25 12:25:18 systemd[1]: Failed to start [email protected] - OpenVPN connection to vtun20.
Requirement:
set interfaces openvpn vtun20 openvpn-option '--push "keepalive 1 10"'
Reference from openvpn documents:
--push option Push a config file option back to the client for remote execution. Note that option must be enclosed in double quotes ("").