Open skret028 opened 1 year ago
This depends on how you're running Docker. Looks like you're passing arguments to docker run
, so you could create a multiline variable, e.g.:
extraconfig="
ifconfig-pool-persist /etc/openvpn/ipp.txt
client-config-dir /etc/openvpn/ccd"
and then -e OVPN_EXTRA=$extraconfig
. I think that should work.
I want to set static IP to a certain client. As I searched,I shall add 2 lines to /etc/openvpn/server.conf
ifconfig-pool-persist ipp.txt
client-config-dir /etc/openvpn/ccd
And setup a file as /etc/openvpn/ccd/usernameifconfig-push 10.8.0.5 10.8.0.6
I tried to modify /etc/openvpn/server.conf,but it restores every launch. I also tried to add
-e OVPN_EXTRA="ifconfig-pool-persist /etc/openvpn/ipp.txt\nclient-config-dir /etc/openvpn/ccd" \
It seems the escape character '\n' dosen't work properly.