OPENVPN基于用户名密码登陆

OPENVPN基于用户名密码登陆:

一、基于via-env

服务端配置:

文 章 源 自 note.t4x.orgByrd's Blog-https://note.t4x.org/service/openvpn-user-and-password-login/

二、基于via-file

1:ovpnauth.sh初始化配置


2:openvpn服务端配置

3:openvpn-auth.sh配置(/etc/openvpn/via-file为用户、密码存放)

4:openvpn服务端配置
文 章 源 自 note.t4x.orgByrd's Blog-https://note.t4x.org/service/openvpn-user-and-password-login/

三、客户端配置

文 章 源 自 note.t4x.orgByrd's Blog-https://note.t4x.org/service/openvpn-user-and-password-login/

四、服务端脚本

1:via-env


2:via-file
文 章 源 自 note.t4x.orgByrd's Blog-https://note.t4x.org/service/openvpn-user-and-password-login/

补充:


3:via-file or via-env both
文 章 源 自 note.t4x.orgByrd's Blog-https://note.t4x.org/service/openvpn-user-and-password-login/

五、常见问题QA

错误:


解决方法:

错误:

解决方法:

错误:

解决方法:
文 章 源 自 note.t4x.orgByrd's Blog-https://note.t4x.org/service/openvpn-user-and-password-login/

服务端注意事项:(非必须)文 章 源 自 note.t4x.orgByrd's Blog-https://note.t4x.org/service/openvpn-user-and-password-login/

1:开启push "redirect-gateway def1 bypass-dhcp bypass-dns"
2:开启转发功能sysctl -w net.ipv4.ip_forward=1
3:开启NAT映射 文 章 源 自 note.t4x.orgByrd's Blog-https://note.t4x.org/service/openvpn-user-and-password-login/

参考文档:
1:https://github.com/troydm/ovpnauth.sh/blob/master/README
2:https://github.com/Rafciq/openwrt/tree/master/openvpn文 章 源 自 note.t4x.orgByrd's Blog-https://note.t4x.org/service/openvpn-user-and-password-login/ 文 章 源 自 note.t4x.orgByrd's Blog-https://note.t4x.org/service/openvpn-user-and-password-login/

申明:除非注明Byrd's Blog内容均为原创,未经许可禁止转载!详情请阅读版权申明!

On this day in past years
August
9
 
Byrd
  • by Published onAugust 9, 2019
  • 原文链接:https://note.t4x.org/service/openvpn-user-and-password-login/
Comments  3  Visitor  3
    • Erk 0

      不错哟

      • patqian 0

        你这里没有ovpnauth.conf脚本 然道就是ovpn_auth.conf这个脚本吗?

          • Byrd
            Byrd

            @ patqian vpn认证常用的基本就是基于证书、基于用户名和密码[分为本地文件和类似于openladp认证]。ovpnauth.conf是账号密码配置。

        匿名

        Comment

        Anonymous

        Slide puzzle verification.