I have an auth script defined via
auth-user-pass-verify in
server.conf. The script correctly returns "
0" for good username and password combos and "
1" for bad ones. However, the VPN connects either way.
Here's a line from
/var/log/openvpn.log:
TLS: Username/Password authentication succeeded for username 'FakeUser' [CN SET]
Here's
/etc/openvpn/server.conf:
port 1194
proto tcp
dev tun
ca ca.crt
cert server.crt
key server.key
dh dh1024.pem
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "redirect-gateway def1"
push "dhcp-option DNS 128.111.1.2"
keepalive 10 120
comp-lzo
persist-key
persist-tun
status /var/log/openvpn-status.log
log-append /var/log/openvpn.log
verb 3
auth-user-pass-verify /etc/openvpn/auth.php via-file
tmp-dir /dev/shm
username-as-common-name
I have the auth script logging separately in detail so, I know it's working the way it should. I even tried a fake script that does nothing but print "
1" and it still connects. So, by my thinking, the openvpn server is ignoring it for some reason. ...I'm not sure where my mistake is.