我对 OpenWRT 很新,我在这里面临一些问题。
我使用 OpenVPN Access Server Web GUI 在 Ubuntu 上设置了 OpenVPN 服务器,并相应地获得了客户端配置文件client.ovpn
。我还启用了“Google Authenticator Multi-Factor Authentication”。当我使用client.ovpn
配置为客户端时,它在我的手机,我的另一台 PC 上运行良好,但是当我尝试在路由器上的 OpenWRT 上启动客户端时
根据https://openvpn.net/vpn-server-resources/connecting-to-access-server-with-linux/,我使用openvpn --config client.ovpn --auth-user-pass --auth-retry interact
启动连接,并提示我输入用户名和密码,这是有道理的,但随后从未提示我输入身份验证器代码。实际上,当我查看响应时,它确实要求我输入代码,但我从来没有地方可以输入它。相反,它要求再次输入用户名,从而陷入循环。从下面看:(第四行)
root@OpenWrt:/etc/openvpn# openvpn --config client_gui.ovpn --auth-retry interac
t
Mon Mar 9 19:01:18 2020 Unrecognized option or missing or extra parameter(s) in client_gui.ovpn:124: static-challenge (2.4.7)
Mon Mar 9 19:01:18 2020 OpenVPN 2.4.7 mipsel-openwrt-linux-gnu [SSL (mbed TLS)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD]
Mon Mar 9 19:01:18 2020 library versions: mbed TLS 2.16.3, LZO 2.10
Enter Auth Username:london
Enter Auth Password:
Mon Mar 9 19:01:24 2020 WARNING: --ns-cert-type is DEPRECATED. Use --remote-cert-tls instead.
Mon Mar 9 19:01:24 2020 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Mon Mar 9 19:01:24 2020 Outgoing Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Mon Mar 9 19:01:24 2020 Incoming Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Mon Mar 9 19:01:24 2020 TCP/UDP: Preserving recently used remote address: [AF_INET]192.168.8.222:1194
Mon Mar 9 19:01:24 2020 Socket Buffers: R=[163840->163840] S=[163840->163840]
Mon Mar 9 19:01:24 2020 UDP link local: (not bound)
Mon Mar 9 19:01:24 2020 UDP link remote: [AF_INET]192.168.8.222:1194
Mon Mar 9 19:01:24 2020 TLS: Initial packet from [AF_INET]192.168.8.222:1194, sid=fb509f08 f4ae8b1f
Mon Mar 9 19:01:24 2020 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
Mon Mar 9 19:01:24 2020 VERIFY OK: depth=1, CN=OpenVPN CA
Mon Mar 9 19:01:24 2020 VERIFY OK: nsCertType=SERVER
Mon Mar 9 19:01:24 2020 VERIFY OK: depth=0, CN=OpenVPN Server
Mon Mar 9 19:01:24 2020 Control Channel: TLSv1.2, cipher TLS-ECDHE-RSA-WITH-AES-256-GCM-SHA384, 2048 bit key
Mon Mar 9 19:01:24 2020 [OpenVPN Server] Peer Connection Initiated with [AF_INET]192.168.8.222:1194
Mon Mar 9 19:01:25 2020 SENT CONTROL [OpenVPN Server]: 'PUSH_REQUEST' (status=1)
Mon Mar 9 19:01:25 2020 AUTH: Received control message: AUTH_FAILED,CRV1:R,E:PG_09HT0rZcjdFd6GnA:bG9uZG9u:Enter Authenticator Code
Mon Mar 9 19:01:25 2020 SIGUSR1[soft,auth-failure] received, process restarting
Mon Mar 9 19:01:25 2020 Restart pause, 5 second(s)
Enter Auth Username:
如何解决这个问题?client.ovpn
中有什么需要修改的吗?谢谢!

在 18.04 中,在 client.ovpn 所在的目录中创建一个文件 userpass。
Userpass 应包含 2 行
用户名在第一行
密码在第二行
并保存文件,打开新终端,执行脚本。
openvpn--config client.ovpn--auth-user-pass userpass--auth-retry interact
In 16.04
执行以下代码
sudo -s
wget -O - https://swupdate.openvpn.net/repos/repo-public.gpg|apt-key add -
echo "deb http://build.openvpn.net/debian/openvpn/stable xenial main" > /etc/apt/sources.list.d/openvpn-aptrepo.list
apt-get update
apt-get dist-upgrade
在 client.ovpn 所在的目录中创建一个文件 userpass。
Userpass 应包含 2 行
用户名在第一行
密码在第二行
并保存文件,打开新终端,执行脚本。
openvpn--config client.ovpn--auth-user-pass userpass--auth-retry interact
本站系公益性非盈利分享网址,本文来自用户投稿,不代表码文网立场,如若转载,请注明出处
评论列表(68条)