You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Your syntax is incorrect: foreign_option_{n} is a variable which is set when a server pushes something to the client, which the client does not understand. I do not believe you can set it in a config file. Also, if it can be set then the syntax would be setenv foreign_option_3 'dhcp-option DOMAIN be.bnc.ch'. Also, your variable for PATH may need to be quoted.
setenv PATH "/usr/sbin:/usr/bin:/sbin:/bin"
setenv foreign_option_3 "dhcp-option DOMAIN-SEARCH domain.fr"
setenv foreign_option_4 "dhcp-option DOMAIN-SEARCH sub.domain.fr"
script-security 2
up /etc/openvpn/scripts/openvpn-update-resolv-conf/update-resolv-conf.sh
down /etc/openvpn/scripts/openvpn-update-resolv-conf/update-resolv-conf.sh
down-pre
keeps adding only search domain.fr instead of search domain.fr sub.domain.fr
If I edit update-resolv-conf.sh to set this, tt adds the two domains search, which is what i want
# Example envs set from openvpn:
# foreign_option_1='dhcp-option DNS 193.43.27.132'
# foreign_option_2='dhcp-option DNS 193.43.27.133'
foreign_option_3="dhcp-option DOMAIN-SEARCH domain.fr"
foreign_option_4="dhcp-option DOMAIN-SEARCH sub.domain.fr"
I just moved to an os without systemd, before i was using systemd script and I only had to set to client.ovpn, I don't know why its not working anymore.
I want to set my
DOMAIN-SEARCH
, but when I use the following code inclient.ovpn
, the script can't read itIs the only way is to set vars in
/etc/openvpn/scripts/openvpn-update-resolv-conf/update-resolv-conf.sh
?The text was updated successfully, but these errors were encountered: