Community discussions

MikroTik App
 
Forces
just joined
Topic Author
Posts: 2
Joined: Sat Apr 03, 2021 10:34 pm

Openvpn client could not connect

Sat Apr 03, 2021 10:58 pm

Hello, folks.

I'm trying to setup my hap ac lite2 as openvpn client. Configuration was made to achieve this:
/certificate import file-name=ca.crt
/certificate import file-name=client.crt
/certificate import file-name=client.key

/ppp profile
add change-tcp-mss=yes name=ovpn-server only-one=yes use-encryption=\
    required use-mpls=no
/interface ovpn-client
add certificate=client.crt_0 cipher=aes128 connect-to=SERVER_IP disabled=yes \
    mac-address=MAC name=ovpn-server profile=\
    ovpn-server user=ovpn-user verify-server-certificate=\
    yes
/system logging
    add prefix=OVPN topics=ovpn,debug,!packet
Openvpn server config:
port 1194
proto tcp
dev tun0
user nobody
group nogroup
persist-key
persist-tun
keepalive 10 120
topology subnet
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "dhcp-option DNS 1.0.0.1"
push "dhcp-option DNS 1.1.1.1"
push "redirect-gateway def1 bypass-dhcp"
dh none
ecdh-curve prime256v1
tls-crypt tls-crypt.key 0
crl-verify crl.pem
ca ca.crt
cert server_blabla.crt
key server_blabla.key
auth SHA1
cipher AES-128-GCM
ncp-ciphers AES-128-GCM
tls-server
tls-version-min 1.2
tls-cipher TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256
client-config-dir /etc/openvpn/ccd
status /var/log/openvpn/status.log
verb 6
With logging of ovpn and debug messages turned on in settings the only thing I see in log is
22:36:41 ovpn,info ovpn-server: initializing... 
22:36:41 ovpn,info ovpn-server: connecting... 
22:37:01 ovpn,debug OVPN: ovpn-server: disconnected <could not connect> 
22:37:01 ovpn,info ovpn-server: terminating... - could not connect 
From the server side I see nothing in log when mikrotik is trying to connect. All certs and key are fine, no password. Connection without openvpn is also fine. I can easily connect from PC using ovpn file that contains all the data. Any ideas?
 
Forces
just joined
Topic Author
Posts: 2
Joined: Sat Apr 03, 2021 10:34 pm

Re: Openvpn client could not connect

Mon Apr 05, 2021 6:06 pm

Hello? Is there anybody who can approve my post?
Last edited by Forces on Mon Apr 05, 2021 6:06 pm, edited 1 time in total.

Who is online

Users browsing this forum: mtkvvv and 31 guests