Hello,
I am trying to set up a WireGuard VPN on my Mikrotik router.
The topology is simple, I have an edge router which gets the public IP, my Mikrotik is connected to it and gets it's local IP via DHCP from the edge router in ether1 (subnet 192.168.1.0/24), and my machines are connected to the Mikrotik (subnet 192.168.88.0/24).
The Mikrotik is DMZ'd in the edge router.
I am trying to set up WireGuard in the 10.10.1.0/24 subnet, and so far I have had no success on connecting from a client. I have quadruple checked the public and private keys from both server and client. When I use packet sniffer on the Mikrotik, I can see packets arriving from 192.168.1.158 to port 13231, but I don't know if they are being processed or blocked or ignored.
This is the pertinent Mikrotik config:
# 2025-08-08 04:07:10 by RouterOS 7.19.4
# software id = XXX
#
# model = RB4011iGS+
# serial number = XXX
/ip firewall filter
add action=accept chain=input comment=\
"defconf: accept established,related,untracked" connection-state=\
established,related,untracked
add action=accept chain=input comment="vpn wireguard" dst-port=13231 protocol=udp
add action=accept chain=input comment="vpn wireguard interface input" src-address=\
10.10.1.0/24
add action=accept chain=forward comment="vpn allow vpn to lan" dst-address=\
192.168.88.0/24 src-address=10.10.1.0/24
add action=accept chain=forward comment="vpn allow lan to vpn" dst-address=\
10.10.1.0/24 src-address=192.168.88.0/24
add action=drop chain=input comment="defconf: drop invalid" connection-state=\
invalid
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" \
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 hw-offload=yes
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
add action=drop chain=forward comment="defconf: drop all from WAN not DSTNATed" \
connection-nat-state=!dstnat connection-state=new in-interface-list=WAN
# 2025-08-08 04:09:21 by RouterOS 7.19.4
# software id = XXX
#
# model = RB4011iGS+
# serial number = XXX
/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade" ipsec-policy=\
out,none out-interface-list=WAN
add action=masquerade chain=srcnat comment="vpn wireguard" src-address=10.10.1.0/24
add action=masquerade chain=srcnat comment="vpn asquerade vpn to lan" dst-address=\
192.168.88.0/24 src-address=10.10.1.0/24
add action=dst-nat chain=dstnat comment="RDP (TCP)" dst-address=192.168.1.158 \
dst-port=5900 protocol=tcp to-addresses=192.168.88.30 to-ports=3389
add action=dst-nat chain=dstnat comment="RDP (UDP)" dst-address=192.168.1.158 \
dst-port=5900 protocol=udp to-addresses=192.168.88.30 to-ports=3389
# 2025-08-08 04:10:44 by RouterOS 7.19.4
# software id = XXX
#
# model = RB4011iGS+
# serial number = XXX
/ip address
add address=192.168.88.1/24 comment=defconf interface=bridge network=192.168.88.0
add address=10.10.1.1/24 interface=wg0 network=10.10.1.0
# 2025-08-08 04:11:25 by RouterOS 7.19.4
# software id = XXX
#
# model = RB4011iGS+
# serial number = XXX
/interface wireguard
add disabled=yes listen-port=13231 mtu=1420 name=wg0
/interface wireguard peers
add allowed-address=::/0 interface=wg0 name=usr0 persistent-keepalive=25m \
public-key="XXX"
# 2025-08-08 04:13:18 by RouterOS 7.19.4
# software id = XXX
#
# model = RB4011iGS+
# serial number = XXX
/ip dhcp-client
add comment=defconf interface=ether1 use-peer-dns=no
I am a beginner in RouterOS, so I am unsure whether this configuration if good or not. Also the WireGuard interface is currently showing as disabled because I disabled it since it wasn't working.
This is client config:
[Interface]
PrivateKey = my client private key
Address = 10.10.1.2/32
DNS = 192.168.88.1
[Peer]
PublicKey = my server public key
AllowedIPs = 10.10.1.0/24, 192.168.88.0/24
Endpoint = XXX.sn.mynetname.net:13231
PersistentKeepalive = 25
The output log of WireGuard says: 2025-08-07 23:48:30.019: [TUN] [VPN_NAME] Handshake for peer 1 (MY_PUBLIC_ADDRESS:13231) did not complete after 5 seconds, retrying (try 2)
I will appreciate any help.
Thanks in advance.
