include inside client-config-dir

This is where we can discuss what we would like to see added or changed in OpenVPN.
Post Reply
Elimin
OpenVpn Newbie
Posts: 1
Joined: Tue May 15, 2018 7:40 am

include inside client-config-dir

Post by Elimin » Tue May 15, 2018 9:05 am

Hello,

Is it possible to set some "include" in the client configuration?

Each client has its own IP configuration, but many of them have the same routing configuration.
g8-cam5

ifconfig-push 192.168.240.18 192.168.240.17

push "route 192.168.200.0 255.255.255.0"
push "route 192.168.212.0 255.255.255.0"
push "route 192.168.248.28 255.255.255.255"


I want something like this:
g8-cam5

ifconfig-push 192.168.240.18 192.168.240.17
include "g8-routing"

g8-routing

push "route 192.168.200.0 255.255.255.0"
push "route 192.168.212.0 255.255.255.0"
push "route 192.168.248.28 255.255.255.255"



Is it possible?

Or maybe this functionality will be added?

User avatar
TinCanTech
OpenVPN Protagonist
Posts: 4877
Joined: Fri Jun 03, 2016 1:17 pm

Re: include inside client-config-dir

Post by TinCanTech » Tue May 15, 2018 9:55 am

Elimin wrote:
Tue May 15, 2018 9:05 am
Is it possible to set some "include" in the client configuration?
According to the manual, --config is an allowed option in a CCD file, which essentially means:
"include" this extra config file when reading this CCD file.

Try it and see if it does what you want ..

There is also, --push-reset and --push-remove, see the manual for their usage.

Post Reply