Hello,
I have trouble configuring an OpenVPN Client on my Mikrotik Router. I want it to connect to my NordVPN account, so I can use it as VPN gateway.
All the instructions I found online advised to just import the .ovpn file and add masquerading in the firewall. But that does not work me. Also I disabled all block rules in firewall, just to make it work once.
I can't ping 8.8.8.8 and have no internet connection. The upstream router does not capture any packets either.
Here is my configuration:
[admin@MikroTik] > /export
2026-05-27 20:29:26 by RouterOS 7.22.3
model = RB962UiGS-5HacT2HnT
/interface bridge
add admin-mac=6C:3B:6B:19:C4:99 auto-mac=no comment=defconf name=bridge port-cost-mode=short
/interface ovpn-client
add auth=sha512 cipher=aes256-cbc connect-to= mac-address= name=ovpn-import1779901690 protocol=udp user= verify-server-certificate=yes
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-b/g/n channel-width=20/40mhz-XX country=germany disabled=no distance=indoors frequency=auto installation=indoor mode=ap-bridge ssid=MikroTik-19C49F
wireless-protocol=802.11
set [ find default-name=wlan2 ] band=5ghz-a/n/ac channel-width=20/40/80mhz-XXXX country=germany distance=indoors frequency=auto installation=indoor mode=ap-bridge ssid=MikroTik-19C49E
wireless-protocol=802.11
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/interface lte apn
set [ find default=yes ] ip-type=ipv4 use-network-apn=no
/interface wireless security-profiles
set [ find default=yes ] authentication-types=wpa-psk,wpa2-psk mode=dynamic-keys supplicant-identity=MikroTik
/ip pool
add name=dhcp ranges=192.168.98.10-192.168.98.254
/ip dhcp-server
add address-pool=dhcp interface=bridge lease-time=10m name=defconf
/interface bridge port
add bridge=bridge comment=defconf ingress-filtering=no interface=ether2 internal-path-cost=10 path-cost=10
add bridge=bridge comment=defconf ingress-filtering=no interface=ether3 internal-path-cost=10 path-cost=10
add bridge=bridge comment=defconf ingress-filtering=no interface=ether4 internal-path-cost=10 path-cost=10
add bridge=bridge comment=defconf ingress-filtering=no interface=ether5 internal-path-cost=10 path-cost=10
add bridge=bridge comment=defconf ingress-filtering=no interface=sfp1 internal-path-cost=10 path-cost=10
add bridge=bridge comment=defconf ingress-filtering=no interface=wlan1 internal-path-cost=10 path-cost=10
add bridge=bridge comment=defconf ingress-filtering=no interface=wlan2 internal-path-cost=10 path-cost=10
/ip firewall connection tracking
set udp-timeout=10s
/ip neighbor discovery-settings
set discover-interface-list=LAN
/ip settings
set max-neighbor-entries=8192
/ipv6 settings
set disable-ipv6=yes max-neighbor-entries=8192
/interface list member
add comment=defconf interface=bridge list=LAN
add comment=defconf interface=ether1 list=WAN
/ip address
add address=192.168.98.1/24 comment=defconf interface=bridge network=192.168.98.0
/ip dhcp-client
add comment=defconf default-route-tables=main interface=ether1 name=ether1
/ip dhcp-server network
add address=192.168.98.0/24 comment=defconf dns-server=8.8.8.8 gateway=192.168.98.1
/ip dns
set allow-remote-requests=yes
/ip dns static
add address=192.168.98.1 comment=defconf name=router.lan type=A
/ip firewall filter
add action=accept chain=input comment="defconf: accept established,related,untracked" connection-state=established,related,untracked
add action=drop chain=input comment="defconf: drop invalid" connection-state=invalid disabled=yes
add action=accept chain=input comment="defconf: accept ICMP" protocol=icmp
add action=accept chain=input comment="defconf: accept to local loopback (for CAPsMAN)" dst-address=127.0.0.1
add action=drop chain=input comment="defconf: drop all not coming from LAN" disabled=yes in-interface-list=!LAN
add action=accept chain=forward comment="defconf: accept in ipsec policy" ipsec-policy=in,ipsec
add action=accept chain=forward comment="defconf: accept out ipsec policy" ipsec-policy=out,ipsec
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" connection-state=established,related
add action=accept chain=forward comment="defconf: accept established,related, untracked" connection-state=established,related,untracked
add action=drop chain=forward comment="defconf: drop invalid" connection-state=invalid disabled=yes
add action=drop chain=forward comment="defconf: drop all from WAN not DSTNATed" connection-nat-state=!dstnat connection-state=new disabled=yes in-interface-list=WAN
/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade" ipsec-policy=out,none out-interface-list=WAN
add action=masquerade chain=srcnat out-interface=ovpn-import1779901690
/ip ipsec profile
set [ find default=yes ] dpd-interval=2m dpd-maximum-failures=5
/routing bfd configuration
add disabled=no interfaces=all min-rx=200ms min-tx=200ms multiplier=5
/system clock
set time-zone-name=Europe/Berlin
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN
Here is the dynamic route table:
[admin@MikroTik] > /ip/route/print
Flags: D - DYNAMIC; A - ACTIVE; c - CONNECT, d - DHCP, v - VPN
Columns: DST-ADDRESS, GATEWAY, ROUTING-TABLE, DISTANCE
DST-ADDRESS GATEWAY ROUTING-TABLE DISTANCE
DAd 0.0.0.0/0 192.168.88.1 main 1
DAv 0.0.0.0/1 10.100.0.1 main 0
DAc 10.100.0.0/20 ovpn-import1779901690 main 0
DAv <ip/32> 192.168.88.1 main 0
DAv 128.0.0.0/1 10.100.0.1 main 0
DAc 192.168.88.0/24 ether1 main 0
DAc 192.168.98.0/24 bridge main 0
Here is the OVPN Konfig:
client
dev tun
proto udp
remote 1194
resolv-retry infinite
nobind
tun-mtu 1500
persist-key
persist-tun
ping 15
ping-restart 0
ping-timer-remremote-cert-tls server
auth-user-pass
verb 3
pull
cipher AES-256-CBC
auth SHA512
-----BEGIN CERTIFICATE-----
-----END CERTIFICATE-----
key-direction 1
2048 bit OpenVPN static key
-----BEGIN OpenVPN Static key V1-----
-----END OpenVPN Static key V1-----
I read that Mikrotik is not very good with OpenVPN and you should use Wireguard. But sometimes OpenVPN just works better for my usecase. Also I like learning new stuff and would like to know if I do some stupid mistake. If it's just a bug in Mikrotik ROS, that's fine for me
Any help is appreciated and best regards
Andy