I followed the document @ https://www.bgocloud.com/knowledgebase/73/mikrotik-chr-how-to-set-up-openvpn-server-for-your-iot-devices-video.html to setup a VPN connection. Any help appreciated.
The setup is as follows: Client ---- [[[ Internet ]]] ---- Fixed IP on [ISP Provided Modem] — Static IP 192.168.0.6 of Mikrotik Router.
The OpenVPN config file (adapted from bfocloud) is the following:
client
dev tun
proto tcp-client
remote xx.xx.xx.xx
port 1194
nobind
persist-key
persist-tun
tls-client
remote-cert-tls server
ca ca.crt #CA certificate file
cert client.crt #CLIENT certificate file
key client.key #CLIENT certificate key
verb 4
mute 10
cipher AES-256-CBC
data-ciphers AES-256-CBC
auth SHA1
auth-user-pass secret #File with user/password for VPN
auth-nocache
;redirect-gateway def1 #remove semicolon for full redirect
When I attempt to connect the connection fails. Below is the OVPN log:
2024-12-19 15:54:03 DEPRECATED OPTION: --cipher set to 'AES-256-CBC' but missing in --data-ciphers (AES-256-GCM:AES-128-GCM:CHACHA20-POLY1305). OpenVPN ignores --cipher for cipher negotiations.
2024-12-19 15:54:03 OpenVPN 2.6.12 [git:v2.6.12/038a94bae57a446c] Windows [SSL (OpenSSL)] [LZO] [LZ4] [PKCS11] [AEAD] [DCO] built on Jul 18 2024
2024-12-19 15:54:03 Windows version 10.0 (Windows 10 or greater), amd64 executable
2024-12-19 15:54:03 library versions: OpenSSL 3.3.1 4 Jun 2024, LZO 2.10
2024-12-19 15:54:03 DCO version: 1.2.1
2024-12-19 15:54:03 MANAGEMENT: TCP Socket listening on [AF_INET]127.0.0.1:25340
2024-12-19 15:54:03 Need hold release from management interface, waiting...
2024-12-19 15:54:04 MANAGEMENT: Client connected from [AF_INET]127.0.0.1:52539
2024-12-19 15:54:04 MANAGEMENT: CMD 'state on'
2024-12-19 15:54:04 MANAGEMENT: CMD 'log on all'
2024-12-19 15:54:04 MANAGEMENT: CMD 'echo on all'
2024-12-19 15:54:04 MANAGEMENT: CMD 'bytecount 5'
2024-12-19 15:54:04 MANAGEMENT: CMD 'state'
2024-12-19 15:54:04 MANAGEMENT: CMD 'hold off'
2024-12-19 15:54:04 MANAGEMENT: CMD 'hold release'
2024-12-19 15:54:07 MANAGEMENT: CMD 'username "Auth" "chribonn"'
2024-12-19 15:54:07 MANAGEMENT: CMD 'password [...]'
2024-12-19 15:54:07 MANAGEMENT: CMD 'password [...]'
2024-12-19 15:54:07 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
2024-12-19 15:54:07 TCP/UDP: Preserving recently used remote address: [AF_INET]xx.xx.xx.xx:1194
2024-12-19 15:54:07 ovpn-dco device [OpenVPN Data Channel Offload] opened
2024-12-19 15:54:07 TCP_CLIENT link local: (not bound)
2024-12-19 15:54:07 TCP_CLIENT link remote: [AF_INET]xx.xx.xx.xx:1194
2024-12-19 15:54:07 MANAGEMENT: >STATE:1734620047,WAIT,,,,,,
2024-12-19 15:54:07 MANAGEMENT: >STATE:1734620047,AUTH,,,,,,
2024-12-19 15:54:07 TLS: Initial packet from [AF_INET]xx.xx.xx.xx:1194, sid=5f8879c2 2cc8f0b5
2024-12-19 15:54:08 VERIFY OK: depth=1, C=MT, ST=MT, L=qwert, O=acbd, OU=IT, CN=ca
2024-12-19 15:54:08 VERIFY KU OK
2024-12-19 15:54:08 Validating certificate extended key usage
2024-12-19 15:54:08 ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication
2024-12-19 15:54:08 VERIFY EKU OK
2024-12-19 15:54:08 VERIFY OK: depth=0, C=MT, ST=MT, L=qwert, O=acbd, OU=IT, CN=xx.xx.xx.xx
2024-12-19 15:54:08 Connection reset, restarting [-1]
2024-12-19 15:54:08 Closing DCO interface
2024-12-19 15:54:08 SIGUSR1[soft,connection-reset] received, process restarting
2024-12-19 15:54:08 MANAGEMENT: >STATE:1734620048,RECONNECTING,connection-reset,,,,,
2024-12-19 15:54:08 Restart pause, 1 second(s)
2024-12-19 15:54:09 TCP/UDP: Preserving recently used remote address: [AF_INET]xx.xx.xx.xx:1194
2024-12-19 15:54:09 ovpn-dco device [OpenVPN Data Channel Offload] opened
2024-12-19 15:54:09 TCP_CLIENT link local: (not bound)
2024-12-19 15:54:09 TCP_CLIENT link remote: [AF_INET]xx.xx.xx.xx:1194
2024-12-19 15:54:09 MANAGEMENT: >STATE:1734620049,WAIT,,,,,,
2024-12-19 15:54:09 MANAGEMENT: >STATE:1734620049,AUTH,,,,,,
2024-12-19 15:54:09 TLS: Initial packet from [AF_INET]xx.xx.xx.xx:1194, sid=aeea0c64 ccc6d509
2024-12-19 15:54:09 VERIFY OK: depth=1, C=MT, ST=MT, L=qwert, O=acbd, OU=IT, CN=ca
2024-12-19 15:54:09 VERIFY KU OK
2024-12-19 15:54:09 Validating certificate extended key usage
2024-12-19 15:54:09 ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication
2024-12-19 15:54:09 VERIFY EKU OK
2024-12-19 15:54:09 VERIFY OK: depth=0, C=MT, ST=MT, L=qwert, O=acbd, OU=IT, CN=xx.xx.xx.xx
2024-12-19 15:54:10 Connection reset, restarting [-1]
2024-12-19 15:54:10 Closing DCO interface
2024-12-19 15:54:10 SIGUSR1[soft,connection-reset] received, process restarting