The problem is, ROS does not recognize static.key generated by
openvpn --genkey --secret static.key
which is required on most openvpn client side (tls-auth static.key)
Below is enabled “tls-auth static.key” on client side
Aug 18 17:09:48 ? user.info kernel: Universal TUN/TAP device driver 1.5 (C)1999-2002 Maxim Krasnyansky
Aug 18 17:09:48 ? daemon.notice openvpn[1281]: OpenVPN 2.1.1 mipsel-unknown-linux-gnu [SSL] [LZO2] built on Jan 31 2010
Aug 18 17:09:48 ? daemon.warn openvpn[1281]: WARNING: file '/tmp/up' is group or others accessible
Aug 18 17:09:48 ? daemon.warn openvpn[1281]: WARNING: No server certificate verification method has been enabled. See http://openvpn.net/howto.html#mitm for more info.
Aug 18 17:09:48 ? daemon.warn openvpn[1281]: NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Aug 18 17:09:48 ? daemon.notice openvpn[1281]: Control Channel Authentication: using 'static.key' as a OpenVPN static key file
Aug 18 17:09:48 ? daemon.notice openvpn[1281]: Outgoing Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Aug 18 17:09:48 ? daemon.notice openvpn[1281]: Incoming Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Aug 18 17:09:48 ? daemon.notice openvpn[1281]: Control Channel MTU parms [ L:1543 D:168 EF:68 EB:0 ET:0 EL:0 ]
Aug 18 17:09:48 ? daemon.notice openvpn[1281]: Data Channel MTU parms [ L:1543 D:1450 EF:43 EB:4 ET:0 EL:0 ]
Aug 18 17:09:48 ? daemon.notice openvpn[1283]: Attempting to establish TCP connection with 222.69.93.135:45645 [nonblock]
Aug 18 17:09:49 ? daemon.notice openvpn[1283]: TCP connection established with 222.69.93.135:45645
Aug 18 17:09:49 ? daemon.notice openvpn[1283]: Socket Buffers: R=[87380->131070] S=[16384->131070]
Aug 18 17:09:49 ? daemon.notice openvpn[1283]: TCPv4_CLIENT link local: [undef]
Aug 18 17:09:49 ? daemon.notice openvpn[1283]: TCPv4_CLIENT link remote: 222.69.93.135:45645
Aug 18 17:09:49 ? daemon.notice openvpn[1283]: TLS: Initial packet from 222.69.93.135:45645, sid=9e2c3b38 03794df8
Aug 18 17:09:49 ? daemon.err openvpn[1283]: TLS Error: cannot locate HMAC in incoming packet from 222.69.93.135:45645
Aug 18 17:09:49 ? daemon.err openvpn[1283]: Fatal TLS error (check_tls_errors_co), restarting
Aug 18 17:09:49 ? daemon.notice openvpn[1283]: TCP/UDP: Closing socket
and logs on ROS
ovpn info <ovpn-0>:termination ... -peer disconnected
Even disable “tls-auth” on client side, ROS server will reject client by THE “TLS handshake failed”
Aug 18 17:14:48 ? user.info kernel: Universal TUN/TAP device driver 1.5 (C)1999-2002 Maxim Krasnyansky
Aug 18 17:14:49 ? daemon.notice openvpn[1350]: OpenVPN 2.1.1 mipsel-unknown-linux-gnu [SSL] [LZO2] built on Jan 31 2010
Aug 18 17:14:49 ? daemon.warn openvpn[1350]: WARNING: file '/tmp/up' is group or others accessible
Aug 18 17:14:49 ? daemon.warn openvpn[1350]: WARNING: No server certificate verification method has been enabled. See http://openvpn.net/howto.html#mitm for more info.
Aug 18 17:14:49 ? daemon.warn openvpn[1350]: NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Aug 18 17:14:49 ? daemon.notice openvpn[1350]: Control Channel MTU parms [ L:1543 D:140 EF:40 EB:0 ET:0 EL:0 ]
Aug 18 17:14:49 ? daemon.notice openvpn[1350]: Data Channel MTU parms [ L:1543 D:1450 EF:43 EB:4 ET:0 EL:0 ]
Aug 18 17:14:49 ? daemon.notice openvpn[1354]: Attempting to establish TCP connection with 222.69.93.135:45645 [nonblock]
Aug 18 17:14:50 ? daemon.notice openvpn[1354]: TCP connection established with 222.69.93.135:45645
Aug 18 17:14:50 ? daemon.notice openvpn[1354]: Socket Buffers: R=[87380->131070] S=[16384->131070]
Aug 18 17:14:50 ? daemon.notice openvpn[1354]: TCPv4_CLIENT link local: [undef]
Aug 18 17:14:50 ? daemon.notice openvpn[1354]: TCPv4_CLIENT link remote: 222.69.93.135:45645
Aug 18 17:14:50 ? daemon.notice openvpn[1354]: TLS: Initial packet from 222.69.93.135:45645, sid=d4991844 b26033b8
Aug 18 17:14:50 ? daemon.warn openvpn[1354]: WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
Aug 18 17:14:52 ? daemon.notice openvpn[1354]: VERIFY OK: depth=1, /C=CN/ST=SH/L=Shanghai/O=ZGQC/CN=ZGQC-SY/Email=admin@zg-sh.com
Aug 18 17:14:52 ? daemon.notice openvpn[1354]: VERIFY OK: depth=0, /C=CN/ST=SH/O=ZGQC/CN=ZGQC-SY/Email=admin@zg-sh.com
Aug 18 17:14:59 ? daemon.err openvpn[1354]: Connection reset, restarting [0]
Aug 18 17:14:59 ? daemon.notice openvpn[1354]: TCP/UDP: Closing socket
and logs on ROS
ovpn info <ovpn-0>:termination ... TLS handshake failed
Come on Mikrotik, please get me out of it.
Thank you from a new RB493 and RB493AH user.