Hello,
I’m running an RB4011iGS+5HacQ2HnD with rOS 7.15.2 and configured a Wireguard RoadWarrior like described here:
https://help.mikrotik.com/docs/display/ROS/WireGuard#WireGuard-Applicationexamples
The windows client is unsuccessful connecting to the RB4011iGS+5HacQ2HnD wireguard.
Error: 2024-07-17 18:14:57.768396: [TUN] [Example] Startup complete
2024-07-17 18:14:59.057288: [TUN] [Example] Sending handshake initiation to peer 1 (91.112.XX.XXX:13213)
2024-07-17 18:15:04.182467: [Example] [Aras] Handshake for peer 1 (91.112.XX.XXX:13213) did not complete after 5 seconds, retrying (try 2)
The regarding configs on RB4011iGS+5HacQ2HnD for Wireguard:
/ip address print
Columns: ADDRESS, NETWORK, INTERFACE
# ADDRESS NETWORK INTERFACE
;;; defconf
0 192.168.0.1/24 192.168.0.0 bridge
1 192.168.111.1/24 192.168.111.0 vlan200
2 91.112.XX.XXX/30 91.112.XX.XXX ether1
3 192.168.4.1/24 192.168.4.0 wireguard1
/interface wireguard print
Flags: X - disabled; R - running
0 R name="wireguard1" mtu=1420 listen-port=13231
private-key="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXpriv="
public-key="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXpub"
/interface wireguard peers print
Columns: INTERFACE, PUBLIC-KEY, ENDPOINT-PORT, ALLOWED-ADDRESS
# INTERFACE PUBLIC-KEY E ALLOWED-ADDRES
0 wireguard1 XXXXXXXXXXXXXXXXclientpublickey= 0 192.168.4.2/32
/ip firewall filter print
Flags: X - disabled, I - invalid; D - dynamic
0 D ;;; special dummy rule to show fasttrack counters
chain=forward action=passthrough
1 ;;; allow ALL WireGuard traffic
chain=input action=accept src-address=192.168.4.0/24 log=yes log-prefix=""
2 ;;; allow WireGuard traffic ICMP
chain=input action=accept protocol=icmp src-address=192.168.4.0/24 log=yes log-prefix=""
3 ;;; allow WireGuard
chain=input action=accept protocol=udp dst-port=13231 log=yes log-prefix=""
4 ;;; allow WireGuard traffic MSSQL TCP
chain=input action=accept protocol=tcp src-address=192.168.4.0/24 port=1433 log=yes log-prefix=""
5 ;;; allow WireGuard traffic MSSQL UDP
chain=input action=accept protocol=udp src-address=192.168.4.0/24 port=1433 log=yes log-prefix=""
6 ;;; defconf: accept established,related,untracked
chain=input action=accept connection-state=established,related,untracked
7 ;;; defconf: drop invalid
chain=input action=drop connection-state=invalid
8 ;;; defconf: accept ICMP
chain=input action=accept protocol=icmp
9 ;;; defconf: accept to local loopback (for CAPsMAN)
chain=input action=accept dst-address=127.0.0.1
10 ;;; defconf: drop all not coming from LAN
chain=input action=drop in-interface-list=!LAN
11 ;;; defconf: accept in ipsec policy
chain=forward action=accept ipsec-policy=in,ipsec
12 ;;; defconf: accept out ipsec policy
chain=forward action=accept ipsec-policy=out,ipsec
13 ;;; defconf: fasttrack
chain=forward action=fasttrack-connection hw-offload=yes connection-state=established,related
14 ;;; defconf: accept established,related, untracked
chain=forward action=accept connection-state=established,related,untracked
15 ;;; defconf: drop invalid
chain=forward action=drop connection-state=invalid
16 ;;; defconf: drop all from WAN not DSTNATed
chain=forward action=drop connection-state=new connection-nat-state=!dstnat in-interface-list=WAN
[code]
/interface list member print
Columns: LIST, INTERFACE
# LIST INTERFACE
;;; defconf
0 LAN bridge
;;; defconf
1 WAN ether1
2 LAN wireguard1
Wireguard Client config:
[Interface]
PrivateKey = XXXXXXXXXXXXXXXXXXXXXXXXpriv=
Address = 192.168.4.2/24
[Peer]
PublicKey = XXXXXXXXXXpubkeyfrommikrotik=
AllowedIPs = 192.168.0.0/24
Endpoint = 91.112.XX.XXX:13213
Please help me getting a working wireguard config and that a client can connect and access the remote devices.
What diagnostic options do i have on the Mikrotik side?
Kind regards,
Cynrik