how to include authentification?
faulander opened this issue · comments
script works awesome. But i cannot add authentification to the .ovpn file.
auth-user-pass auth.txt --> auth.txt is in the same directory as namespaced-openvpn.
root@DietPi:~# /root/OpenVPN/namespaced-openvpn --config /root/OpenVPN/frankfurt_-_1_udp.ovpn
Wed Apr 25 21:30:53 2018 WARNING: cannot stat file 'auth.txt': No such file or directory (errno=2)
got it to work - included full path to 'auth.txt' in the .ovpn file
For the record, namespaced-openvpn
should run fine out of /usr/sbin
or /usr/local/sbin
. Parsing of the auth-user-pass
config directive is deferred to openvpn
itself, which evaluates relative paths based on the working directory that the command is executing in. My setup looks like this (pseudocode):
$ cd ~/workspace/vpn_config
$ ls
config.ovpn credentials.txt
$ grep auth-user-pass config.ovpn
auth-user-pass credentials.txt
$ sudo namespaced-openvpn --config ./config.ovpn
and the actual namespaced-openvpn
binary is in /usr/sbin
.
namespaced-openvpn
should be a drop-in replacement for openvpn
to the maximum extent possible --- instances where it is not may be bugs in namespaced-openvpn
:-)