【问题标题】:Why does "~$ sudo openvpn ~/<file_name>.ovpn" give error?为什么“~$ sudo openvpn ~/<file_name>.ovpn”会报错?
【发布时间】:2021-02-02 14:33:54
【问题描述】:

几周前我得到了一个 .ovpn 文件来工作,起初,一切正常,运行没有问题。当我再次尝试使用它时,我得到了这个错误

<user>@<name>:~$ sudo openvpn ~/<file_name>.ovpn
Options error: In [CMD-LINE]:1: Error opening configuration file:
/home/<name>/<file_name>.ovpn
Use --help for more information.

所以我尝试了openvpn --config &lt;file_name&gt;.ovpn 并得到了这个

<user>@<name>:~$ openvpn --config <file_name>.ovpn
Tue Feb  2 11:11:08 2021 OpenVPN 2.4.7 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Sep  5 2019
Tue Feb  2 11:11:08 2021 library versions: OpenSSL 1.1.1f  31 Mar 2020, LZO 2.10
Tue Feb  2 11:11:08 2021 WARNING: No server certificate verification method has been enabled.  See http://openvpn.net/howto.html#mitm for more info.
Tue Feb  2 11:11:08 2021 TCP/UDP: Preserving recently used remote address: [AF_INET]65.175.70.209:1194
Tue Feb  2 11:11:08 2021 UDP link local: (not bound)
Tue Feb  2 11:11:08 2021 UDP link remote: [AF_INET]65.175.70.209:1194
Tue Feb  2 11:11:09 2021 [server] Peer Connection Initiated with [AF_INET]65.175.70.209:1194
Tue Feb  2 11:11:10 2021 ERROR: Cannot ioctl TUNSETIFF tun: Operation not permitted (errno=1)
Tue Feb  2 11:11:10 2021 Exiting due to fatal error

我能做些什么来解决这个问题?提前致谢。

【问题讨论】:

    标签: error-handling terminal connection vpn openvpn


    【解决方案1】:

    我能够使用添加到上一个命令的--auth-retryinteract 来修复它:

    <user>@<name>:~$ sudo openvpn --config <file_name>.ovpn --auth-retry interact         
    Wed Feb  3 10:22:13 2021 OpenVPN 2.4.7 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Sep  5 2019
    Wed Feb  3 10:22:13 2021 library versions: OpenSSL 1.1.1f  31 Mar 2020, LZO 2.10
    Wed Feb  3 10:22:13 2021 WARNING: No server certificate verification method has been enabled.  See http://openvpn.net/howto.html#mitm for more info.
    Wed Feb  3 10:22:13 2021 TCP/UDP: Preserving recently used remote address: [AF_INET]65.175.70.209:1194
    Wed Feb  3 10:22:13 2021 UDP link local: (not bound)
    Wed Feb  3 10:22:13 2021 UDP link remote: [AF_INET]65.175.70.209:1194
    Wed Feb  3 10:22:14 2021 [server] Peer Connection Initiated with [AF_INET]65.175.70.209:1194
    Wed Feb  3 10:22:15 2021 TUN/TAP device tun0 opened
    Wed Feb  3 10:22:15 2021 /sbin/ip link set dev tun0 up mtu 1500
    Wed Feb  3 10:22:16 2021 /sbin/ip addr add dev tun0 local 172.16.100.185 peer 172.16.100.186
    Wed Feb  3 10:22:16 2021 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
    Wed Feb  3 10:22:16 2021 Initialization Sequence Completed
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-09-20
      • 2019-12-27
      • 1970-01-01
      • 2013-03-24
      • 1970-01-01
      相关资源
      最近更新 更多