Page 1 of 1

access env variables from config file

Posted: Fri Mar 06, 2015 1:03 am
by evelio
Hello,

1- Is it possible to access env variables from the config file and do something like this?

if untrusted_ip == subnet/mask:
some option
else:
something else
2- Or is it possible to call an external script, test the variable there and then from the script push
an option to the client?

The thing is some of my users need different config options depending on where they are connecting from. Specif the inactive option.
I dont want to create a different instance because that would complicate the config and im not sure i can assign the same client subnet
on two different openvpn instances. (I'm using pfsense).

any ideas?


regards,
evelio

Re: access env variables from config file

Posted: Fri Mar 06, 2015 11:03 am
by Traffic
See --client-connect in The Manual v23x

env variables are available to scripts but not openvpn config files.