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
So, I've been trying relentlessly to configure openvpn to use mysql for user/pass authorization with no prevail. First I tried pam-mysql, and that caused way too many issues and I found this and decided to give it a try.
Everything seemed to compile correctly and once it did, I placed my configuration file in /etc/openvpn/auth/mysql-auth.conf
I try to connect to the server with the config file, and I get the AUTH_FAILED error, so I check my openvpn server log and this is what the mysql-auth plugin is outputting:
MYSQL-AUTH: [ERROR] Failed to connect to database: Error (1045): Access denied for user 'root
'@'199.101.x.x' (using password: YES)
MYSQL-AUTH: [ERROR] Could not prepare MySQL connection in am_mysql_handle_auth_user_pass_verify
Note:
199.101.x.x is not the MySQL server IP I have in the mysql-auth.conf file, it is the openvpn server IP.
I am also 100% sure the password is correct because I manually connected to the server with mysql with the same password.
Here is what my mysql-auth.conf file contains:
hostname 104.192.x.x
login root
password xxxxxx
db xxxx
port 3306
socket /var/run/mysqld/mysqld.sock
debug_sql on
default_pf_rules_clients accept
default_pf_rules_subnets drop
auth_user_pass_verify_query SELECT username FROM db_users WHERE username='{{escaped_username}}' AND password=SHA1('{{escaped_password}}')
auth_user_pass_verify_user_access_query SELECT username FROM db_users WHERE membership>0 AND active_connections<4
Any ideas that you may have would be very helpful.
The text was updated successfully, but these errors were encountered:
So, I've been trying relentlessly to configure openvpn to use mysql for user/pass authorization with no prevail. First I tried pam-mysql, and that caused way too many issues and I found this and decided to give it a try.
Everything seemed to compile correctly and once it did, I placed my configuration file in /etc/openvpn/auth/mysql-auth.conf
Then I placed this in my openvpn server config:
I try to connect to the server with the config file, and I get the AUTH_FAILED error, so I check my openvpn server log and this is what the mysql-auth plugin is outputting:
Note:
199.101.x.x is not the MySQL server IP I have in the mysql-auth.conf file, it is the openvpn server IP.
I am also 100% sure the password is correct because I manually connected to the server with mysql with the same password.
Here is what my mysql-auth.conf file contains:
Any ideas that you may have would be very helpful.
The text was updated successfully, but these errors were encountered: