OpenVpn:无法接受来自同一用户的多个连接

rea*_*ebo 5 openvpn

情况

  • 我使用的是 OpenVpn Server Access设备,而不是免费的 CE 版本;我不知道它们的配置或行为是否不同。
  • 当前的设备版本是:2.1.9
  • 服务器版本:2.5.2
  • 许可证状态:2台设备
  • 以下所有配置均使用官方 Web 管理界面完成
  • 操作系统 Ubuntu 18.04:Linux realtebo.example.com 4.4.0-134-generic #160-Ubuntu SMP 8 月 15 日星期三 14:58:00 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

涉及配置

  • 每个用户多个会话 开启
  • 监听 eth0:192.168.1.225
  • 端口tcp/1194、udp/1194
  • OSI 层3(路由/NAT)
  • 服务器配置指令 仅包含duplicate-cn
  • 服务器配置指令 仅包含duplicate-cn
  • 我保存并确认将配置传播到运行
  • 我已经尝试过重新启动服务,并重新启动服务器;没有什么变化

问题

  • 在 iPad 和 Android 手机上安装 OpenVpn 官方应用程序
  • 下载客户端证书。
  • 我打开 .ovpn 文件,我可以看到

     # Extra user-defined configuration
     duplicate-cn
    
    Run Code Online (Sandbox Code Playgroud)
  • 我使用 iPad 连接到 VPN

  • 我使用 Android 手机连接到 VPN
  • iPad 正在从 VPN 断开连接
  • iPad明确告诉我

    Client was halted by server: disconnected due to new connection by same user.
    
    Run Code Online (Sandbox Code Playgroud)

日志

请注意以以下开头的行 OVPN 5 OUT

[-] OVPN 4 OUT: '192.168.1.1:55322 TLS: Initial packet from [AF_INET]192.168.1.1:55322, sid=ef370909 6ae63962'
[-] OVPN 4 OUT: '192.168.1.1:55322 VERIFY OK: depth=1, /CN=OpenVPN CA'
[-] OVPN 4 OUT: '192.168.1.1:55322 VERIFY OK: nsCertType=CLIENT'
[-] OVPN 4 OUT: '192.168.1.1:55322 VERIFY OK: depth=0, /CN=realtebo'
[-] OVPN 4 OUT: '192.168.1.1:55322 peer info: IV_GUI_VER=net.openvpn.connect.ios_3.0.0-712'
[-] OVPN 4 OUT: '192.168.1.1:55322 peer info: IV_VER=3.2'
[-] OVPN 4 OUT: '192.168.1.1:55322 peer info: IV_PLAT=ios'
[-] OVPN 4 OUT: '192.168.1.1:55322 peer info: IV_NCP=2'
[-] OVPN 4 OUT: '192.168.1.1:55322 peer info: IV_TCPNL=1'
[-] OVPN 4 OUT: '192.168.1.1:55322 peer info: IV_PROTO=2'
[-] OVPN 4 OUT: '192.168.1.1:55322 peer info: IV_LZO=1'
[-] OVPN 4 OUT: '192.168.1.1:55322 peer info: IV_LZO_SWAP=1'
[-] OVPN 4 OUT: '192.168.1.1:55322 peer info: IV_LZ4=1'
[-] OVPN 4 OUT: '192.168.1.1:55322 peer info: IV_LZ4v2=1'
[-] OVPN 4 OUT: '192.168.1.1:55322 peer info: IV_COMP_STUB=1'
[-] OVPN 4 OUT: '192.168.1.1:55322 peer info: IV_COMP_STUBv2=1'
[-] OVPN 4 OUT: '192.168.1.1:55322 peer info: IV_HWADDR=D3E089DB-77B9-4A5B-95AA-2081A4EB5366'
[-] OVPN 4 OUT: '192.168.1.1:55322 peer info: IV_BS64DL=1'
[-] OVPN 4 OUT: '192.168.1.1:55322 Control Channel: TLSv1.2, cipher TLSv1/SSLv3 ECDHE-RSA-AES256-GCM-SHA384, 2048 bit RSA'
[-] OVPN 4 OUT: '192.168.1.1:55322 [realtebo] Peer Connection Initiated with [AF_INET]192.168.1.1:55322'
[-] OVPN 5 OUT: 'MANAGEMENT: CMD \'client-kill 1 "HALT,disconnected due to new connection by same user"\''
[-] OVPN 5 OUT: 'Delayed exit in 5 seconds'
[-] OVPN 5 OUT: "SENT CONTROL [realtebo_AUTOLOGIN]: 'HALT,disconnected due to new connection by same user' (status=1)"
OMIClientAuth,0,] AUTH SUCCESS {'status': 0, 'reason': 'local auth succeeded', 'serial_list': [], 'user': u'realtebo', 
   'proplist': {u'prop_autologin': u'true', u'pvt_password_digest': '[redacted]', u'type': u'user_compile',
   u'prop_autogenerate': u'true'}, 'common_name': u'realtebo', 'serial': '4'} cli=u'ios'/u'3.2'
[-] OVPN 4 OUT: "MANAGEMENT: CMD 'client-auth 2 0'"
[-] OVPN 4 OUT: 'realtebo/192.168.1.1:55322 OPTIONS IMPORT: compression parms modified'
[-] OVPN 4 OUT: 'realtebo/192.168.1.1:55322 MULTI: Learn: 172.27.232.3 -> realtebo/192.168.1.1:55322'
[-] OVPN 4 OUT: 'realtebo/192.168.1.1:55322 MULTI: primary virtual IP for realtebo/192.168.1.1:55322: 172.27.232.3'
[-] OVPN 4 OUT: "realtebo/192.168.1.1:55322 SENT CONTROL [realtebo]: 'PUSH_REPLY,explicit-exit-notify,topology subnet,route-delay 5 30,
    dhcp-pre-release,dhcp-renew,dhcp-release,route-metric 101,ping 12,ping-restart 50,auth-tokenSESS_ID,comp-lzo yes,redirect-private 
    def1,redirect-private bypass-dhcp,redirect-private autolocal,route-gateway 172.27.232.1,route 192.168.1.0 255.255.255.0,
    route 172.27.224.0 255.255.240.0,dhcp-option DNS 192.168.1.228,dhcp-option ADAPTER_DOMAIN_SUFFIX homenet.telecomitalia.it,
    register-dns,block-ipv6,ifconfig 172.27.232.3 255.255.254.0,peer-id 0,cipher AES-256-GCM' (status=1)"
[-] OVPN 4 OUT: "realtebo/192.168.1.1:55322 Data Channel: using negotiated cipher 'AES-256-GCM'"
[-] OVPN 4 OUT: "realtebo/192.168.1.1:55322 Outgoing Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key"
[-] OVPN 4 OUT: "realtebo/192.168.1.1:55322 Incoming Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key"
[-] OVPN 5 OUT: 'realtebo_AUTOLOGIN/192.168.1.1:39835 SIGTERM[soft,delayed-exit] received, client-instance exiting'
Run Code Online (Sandbox Code Playgroud)

旁注

  • 该用户是标准用户,_不是管理员_
  • 我已经尝试过在两台设备上撤销证书、删除用户、重新创建、重新安装证书;没有什么变化
  • 根据评论,我没有使用静态IP
  • OpenVpn 服务器的最新版本为2.5.2
  • 这个问题似乎从 v1.7.1 开始就被修复了
  • 虽然使用同一用户连接 2 个设备不起作用,但使用不同用户名连接 2 个设备可以工作

类似的问题,以及为什么它们没有帮助