Configure OpenVPN Use account, password Authentication login

Source: Internet
Author: User
Tags auth

First step: Modify the server-side configuration file:

Auth-user-pass-verify/usr/local/openvpn/etc/checkpsw.sh via-env

Client-cert-not-required

Username-as-common-name

Script-security 3

Note: If you add client-cert-not-required, then the user name password is used to authenticate the login, and if not, the certificate and username password are required to double verify the login.

checkpsw.sh Download Address: http://openvpn.se/files/other/checkpsw.sh

The second step: modify the corresponding parameters in the checkpsw.sh, mainly to change the passfile and log_file two variables on it

Step three: Create a new user and password Authentication file, Psw-file (here's the file is server.conf that file, pay attention to storage, path and configuration file when the same)

Vim Psw-file

test123456 (before the user is the password)

Note: Here Psw-file the right, as little as possible.

chmod psw-file

Chown Nobody.nobody Psw-file

Step Fourth: Modify the Client configuration file: client.conf (or Client.ovpn)

Write off these two lines #cert CLIENT1.CRT

#key Client1.key

Add this line again, and you will be prompted to enter your username and password

Auth-user-pass

As shown in figure: (After the change)

Next, we can test the ^_^

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.