Hello there, this is my full config:
# 2025-07-27 22:32:00 by RouterOS 7.15.3
# software id = 7XIZ-DWT6
#
# model = C53UiG+5HPaxD2HPaxD
/interface ovpn-client
add auth=sha256 certificate=cert_ovpn-import1753641707 cipher=aes128-gcm \
connect-to=MyOVPNServerIP disconnect-notify=no mac-address=\
02:2B:7E:B3:95:C9 max-mtu=1560 name=myovpnclient port=1779 profile=\
default-encryption protocol=udp tls-version=only-1.2 user=\
s.fazlollahzadeh
/routing table
add disabled=no fib name=vpn
add disabled=no fib name=saeed-test
/interface ovpn-server server
set auth=sha1,sha256,sha512 certificate=Server cipher=\
aes128-cbc,aes192-cbc,aes256-cbc,aes128-gcm,aes192-gcm,aes256-gcm \
default-profile=default-encryption enabled=yes redirect-gateway=def1 \
require-client-certificate=yes
/ip address
add address=192.168.88.1/24 comment=defconf interface=bridge network=\
192.168.88.0
add address=10.10.99.2 interface=myovpnclient network=10.10.99.0
/ip dhcp-server network
add address=192.168.88.0/24 comment=defconf dns-server=8.8.8.8 gateway=\
192.168.88.1
/ip dns
set allow-remote-requests=yes cache-max-ttl=1h servers=1.1.1.1
/ip firewall mangle
add action=mark-routing chain=prerouting dst-address-list=somelistname \
new-routing-mark=vpn passthrough=yes
add action=mark-routing chain=prerouting dst-address-list=!iran \
new-routing-mark=vpn passthrough=yes src-address-list=wifi-vpn-clients
add action=mark-routing chain=prerouting new-routing-mark=saeed-test \
passthrough=yes src-address-list=l2tp
/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade" \
ipsec-policy=out,none
/ip route
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=gre-nlmt2 pref-src=\
"" routing-table=vpn scope=30 suppress-hw-offload=no target-scope=10
add disabled=yes distance=1 dst-address=0.0.0.0/0 gateway=myovpnclient \
routing-table=vpn scope=30 suppress-hw-offload=no target-scope=10
/ip smb shares
set [ find default=yes ] directory=/pub
/ppp secret
add name=saeed profile=default-encryption
add name=vahid profile=default-encryption
add name=ali profile=default-encryption
/system clock
set time-zone-name=Asia/Tehran
/system ntp client
set enabled=yes
/system ntp client servers
add address=ir.pool.ntp.org
I have an .ovpn file that it works fine in my phone when I’m either home and connected to the home’s router, or I’m outside and use the mobile data internet.
I did import the same file and all certificates and keys are imported, but connection cannot be established.
I see these logs in the /log/print follow
:
22:48:46 ovpn,debug,packet re-sent P_CONTROL kid=0 sid=3b64c51898abe708 pid=1 DATA len=136
22:48:47 ovpn,debug,packet re-sent P_CONTROL_HARD_RESET_CLIENT_V2 kid=0 sid=3b64c51898abe708 pid=0 DATA len=0
22:48:47 ovpn,debug,packet re-sent P_CONTROL kid=0 sid=3b64c51898abe708 pid=1 DATA len=136
22:48:48 ovpn,info serveriropenvpn: disconnected <TLS error: handshake timed out (6)>
22:48:48 ovpn,info serveriropenvpn: terminating... - TLS error: handshake timed out (6)
22:48:48 ovpn,info serveriropenvpn: disconnected
22:48:51 ovpn,info serveriropenvpn: initializing...
22:48:51 ovpn,info serveriropenvpn: connecting...
22:48:51 ovpn,debug,packet sent P_CONTROL_HARD_RESET_CLIENT_V2 kid=0 sid=9b95bac876bfd865 pid=0 DATA len=0
22:48:51 ovpn,debug,packet sent P_CONTROL kid=0 sid=9b95bac876bfd865 pid=1 DATA len=136
22:48:52 ovpn,debug,packet re-sent P_CONTROL_HARD_RESET_CLIENT_V2 kid=0 sid=9b95bac876bfd865 pid=0 DATA len=0
22:48:52 ovpn,debug,packet re-sent P_CONTROL kid=0 sid=9b95bac876bfd865 pid=1 DATA len=136
22:48:53 ovpn,debug,packet re-sent P_CONTROL_HARD_RESET_CLIENT_V2 kid=0 sid=9b95bac876bfd865 pid=0 DATA len=0
22:48:53 ovpn,debug,packet re-sent P_CONTROL kid=0 sid=9b95bac876bfd865 pid=1 DATA len=136
22:48:54 ovpn,debug,packet re-sent P_CONTROL_HARD_RESET_CLIENT_V2 kid=0 sid=9b95bac876bfd865 pid=0 DATA len=0
22:48:54 ovpn,debug,packet re-sent P_CONTROL kid=0 sid=9b95bac876bfd865 pid=1 DATA len=136
The same internet, two different devices and two different behaviors.
Would you please help me how to connect my home router the another openvpn config file?