OPENVPN基于用户名密码登陆

    Read

最近在看openvpn的密码验证,度娘了一些资料,整理如下:

一、基于via-env

服务端配置:

SourceByrd's Weblog-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服务端配置
SourceByrd's Weblog-https://note.t4x.org/service/openvpn-user-and-password-login/

三、客户端配置

SourceByrd's Weblog-https://note.t4x.org/service/openvpn-user-and-password-login/

四、服务端脚本

1:via-env


2:via-file
SourceByrd's Weblog-https://note.t4x.org/service/openvpn-user-and-password-login/

补充:


3:via-file or via-env both
SourceByrd's Weblog-https://note.t4x.org/service/openvpn-user-and-password-login/

五、常见问题QA

错误:


解决方法:

错误:

解决方法:

错误:

解决方法:
SourceByrd's Weblog-https://note.t4x.org/service/openvpn-user-and-password-login/

服务端注意事项:(非必须)SourceByrd's Weblog-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映射 SourceByrd's Weblog-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/openvpnSourceByrd's Weblog-https://note.t4x.org/service/openvpn-user-and-password-login/ SourceByrd's Weblog-https://note.t4x.org/service/openvpn-user-and-password-login/

申明:除非注明Byrd's Blog内容均为原创,未经许可禁止转载!详情请阅读版权申明!
Byrd
  • by Published on August 9, 2019
  • 原文链接:https://note.t4x.org/service/openvpn-user-and-password-login/
Comments  2  Guest  2
    • random
      patqian 0

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

        • Byrd
          Byrd

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

      匿名

      Comment

      Anonymous

      :?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: