Zero doubt that I've done this to myself, so, , go ahead, give me my well-earned flaming....
I have several MikroTik routers, all of them happily talking WireGuard amongst themselves, as well as happily receiving 'road warrior' (Windows mobile client) WireGuard connections. All of them recently updated to 7.24 (stable).
Except one. I've recently configured one RB951Ui-2HnD to go at a new site, and the WireGuard 'client' on that router does not seem to be even attempting to connect to its 'server' peer. (The 'server' is "MikroTik4", the 'client' is "MikroTik3B"; the WireGuard peer configuration on MikroTik4 for the MikroTik3B client is set to 'responder', the peer configuration on MikroTik3B for the MikroTik4 'server' is NOT set to responder).
I suspect this may have something to do with the unique bridge configuration that I have on MikroTik3B, which I have because I had noticed a DHCP service weirdness, so I'll start by describing that:
MikroTik3B is not directly exposed to the Internet. It sits behind a FRITZ!Box ISP router. MikroTik3B has a static IP address within the FRITZ!Box's LAN (192.168.178.x/24), and is plugged into the FRITZ!Box via MikroTik3B Eth2 -> some Ethernet port on the FRITZ!Box. MikroTik3B's default route is to/through the FRITZ!Box (192.168.178.1). That works. MikroTik3B can reach the Internet, can check MikroTik's servers for updates, can route traffic for hosts connected to MikroTik3B's offered wireless network to the Internet; MikroTik3B's local LAN for its wireless clients is 192.168.252.0/24, for which it runs a DHCP server. Everything works fine .. except:
Initially, when a wireless client would connect to MikroTik3B's wifi and issue a DHCP client request, despite that MikroTik3B runs a DHCP server:
[admin@MikroTik3B] > /ip/dhcp-server print detail
0 ;;;
name="FelinesNJDad" interface=MTik3B-wlan1 lease-time=10m address-pool=FelinesNJDadDHCP dynamic-lease-identifiers=client-mac,client-id server-address=192.168.252.3
add-dns-entries-suffix="lan" use-radius=no use-reconfigure=no lease-script="" dhcp-option-set=FelinesDad_DHCP_Options_set address-lists="" support-broadband-tr101=no
.. the wireless client would end up getting a DHCP lease from the FRITZ!Box on the other side of MikroTik3B's wireless/Ethernet bridge. I didn't want that.
So, I removed MikroTik3B's wireless interface from MikroTik3B's (one and only) bridge:
[admin@MikroTik3B] > /interface/bridge/print
Flags: R - RUNNING
0 R ;;; defconf
name="bridge" mtu=auto actual-mtu=1500 l2mtu=1598 arp=enabled arp-timeout=auto mac-address=D4:01:C3:C6:CD:A9 protocol-mode=rstp fast-forward=yes igmp-snooping=no
auto-mac=no admin-mac=D4:01:C3:C6:CD:A9 ageing-time=5m priority=0x8000 max-message-age=20s forward-delay=15s transmit-hold-count=6 vlan-filtering=no dhcp-snooping=no
dhcpv6-snooping=no ra-guard=no port-cost-mode=short max-learned-entries=auto mlag-peer-port=none mlag-priority=128 mlag-heartbeat=5s[admin@MikroTik3B] > /interface/bridge/port/print
Flags: I - INACTIVE; H - HW-OFFLOAD
Columns: INTERFACE, BRIDGE, HW, HORIZON, TRUSTED, TRUSTED-RA, TRUSTED-DHCPV6, FAST-LEAVE, PATH-COST, INTERNAL-PATH-COST, BPDU-GUARD, EDGE, POINT-TO-POINT, PVID,
FRAME-TYPESN INTERFACE BRIDGE HW HORIZON TRUSTED TRUSTED-RA TRUSTED-DHCPV6 FAST-LEAVE PATH-COST INTERNAL-PATH-COST BPDU-GUARD EDGE POINT-TO-POINT PVID FRAME-TYPES
;;; defconf
0 H ether2 bridge yes none no no no no 10 10 no auto auto 1 admit-all
;;; defconf
1 IH ether3 bridge yes none no no no no 10 10 no auto auto 1 admit-all
;;; defconf
2 IH ether4 bridge yes none no no no no 10 10 no auto auto 1 admit-all
;;; defconf
3 IH ether5 bridge yes none no no no no 10 10 no auto auto 1 admit-all
(notice, no wireless interface in bridge's port list)
Since doing that, everything - except MikroTik3B being a WireGuard 'client' peer of MikroTik4, works. Wireless clients of MikroTik3B get (only) a DHCP address from MikroTik3B's DHCP server on MTik3B-wlan1, and can talk to the Internet through MikroTik3B through the FRITZ!Box just fine. (I have not attempted to test inbound WireGuard connections from the Internet to MikroTik3B).
Here are all of MikroTik3B's interfaces:
[admin@MikroTik3B] > /interface/print
Flags: X - DISABLED; R - RUNNING; S - SLAVE
Columns: NAME, TYPE, ACTUAL-MTU, L2MTU, MAX-L2MTU, MAC-ADDRESSN NAME TYPE ACTUAL-MTU L2MTU MAX-L2MTU MAC-ADDRESS
0 ether1 ether 1500 1598 2028 D4:01:C3:C6:CD:A8
1 RS ether2 ether 1500 1598 2028 D4:01:C3:C6:CD:A9
2 S ether3 ether 1500 1598 2028 D4:01:C3:C6:CD:AA
3 S ether4 ether 1500 1598 2028 D4:01:C3:C6:CD:AB
4 S ether5 ether 1500 1598 2028 D4:01:C3:C6:CD:AC
5 MTik3B-wlan1 wlan 1500 1600 2290 D4:01:C3:C6:CD:AD
;;; defconf
6 R bridge bridge 1500 1598 D4:01:C3:C6:CD:A9
7 R lo loopback 65536 00:00:00:00:00:00
8 sstp-in1 sstp-in
;;; (old) Pegged-up VPN route to Barcelona network
9 X sstp-out1 sstp-out
10 R wg1 wg 1420
.. and the details of the wireless interface:
[admin@MikroTik3B] > /interface/print detail where name="MTik3B-wlan1"
5 name="MTik3B-wlan1" default-name="wlan1" type="wlan" mtu=1500 actual-mtu=1500 l2mtu=1600 max-l2mtu=2290 vrf=main mac-address=D4:01:C3:C6:CD:AD link-downs=0
The WireGuard setup (I'll omit the MikroTik4 'server' side since that works for all of my other MikroTik router 'client' peers and for various Windows 'road warrier' peers, and the problem is that I never see any attempts from MikroTik3B to even send a single connection packet out):
[admin@MikroTik3B] > /interface/wireguard/print detail
Flags: R - RUNNING
0 R name="wg1" mtu=1420 listen-port={myport} public-key="{public key}="0 ;;; This MikroTik3B as a WG client of Tik4 in BCN
interface=wg1 name="MikroTik4-WG" public-key="{other public key}=" endpoint-address={MikroTik4's public DNS} endpoint-port={myport}
current-endpoint-address="" current-endpoint-port=0 allowed-address=192.168.255.0/26,192.168.255.64/26,192.168.255.128/26 persistent-keepalive=30s client-endpoint=""
client-allowed-address=::/0 rx=0 tx=0
At no time do I ever see any packet cross any of MikroTik3B's interfaces for {myport}, at no time do I ever see any packet arriving on MikroTik4 from MikroTik3B's public IP address, at no time do I see any system log entries for WireGuard on MikroTik3B (I have /system/logging add topics=ppp,wireguard,debug,info,warning,packet action=memory). (Except, if I disable/enable the MikroTik3B 'client' peer to MikroTik4 then the system log will show the disable/enable messages).
The last-handshake field on MikroTik3B for its 'client' peer relationship with MikroTik4 is always empty.
Okay, flame me: what have I done wrong?
thank you...
-Jay