I’m likely missing something simple, but I followed the RouterOS documentation to set up a WireGuard peer (i.e., an iOS device) that will be connecting to reach internal resources. The client authenticates properly, so I think there are no problems in the WireGuard setup:
/interface wireguard
add listen-port=59703 mtu=1420 name=homevpn
/interface wireguard peers
add allowed-address=0.0.0.0/0 interface=homevpn public-key="…"
However, traffic from the client goes nowhere. I have firewall rules that allow WireGuard traffic:
/ip firewall filter
add action=accept chain=input comment="defconf: accept ICMP" protocol=icmp
add action=accept chain=input comment="defconf: accept established,related,untracked" connection-state=established,related,untracked
add action=accept chain=input comment="Allow WireGuard" dst-port=59703 protocol=udp
add action=drop chain=input comment="defconf: drop invalid" connection-state=invalid
add action=accept chain=input comment="Allow VLAN" in-interface-list=VLAN
add action=drop chain=input comment="drop all else"
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=accept chain=forward comment="VLAN Internet access" connection-state=new in-interface-list=VLAN out-interface-list=WAN
add action=accept chain=forward comment="VPN to COMMON_VLAN" in-interface=homevpn out-interface=COMMON_VLAN
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
add action=drop chain=forward comment="defconf: drop bad forward IP addresses" src-address-list=no_forward_ipv4
add action=drop chain=forward comment="defconf: drop bad forward IP addresses" dst-address-list=no_forward_ipv4
add action=drop chain=forward comment="drop everything else"
In the above rules, COMMON_VLAN is 192.168.2.0/24 and contains all of the resources the VPN client needs to access. Please refer to the interface lists below for the rest:
/interface list member print
Columns: LIST, INTERFACE
# LIST INTERFACE
;;; defconf
0 LAN bridge
;;; defconf
1 WAN ether1
2 VLAN BASE_VLAN
3 VLAN COMMON_VLAN
I also defined an IP address for the WireGuard interface and a route to it was dynamically created:
/ip address
add address=192.168.10.1/24 interface=homevpn network=192.168.10.0
/ip route print
Flags: D - DYNAMIC; A - ACTIVE; c, s, y - COPY
Columns: DST-ADDRESS, GATEWAY, DISTANCE
# DST-ADDRESS GATEWAY DISTANCE
0 As 0.0.0.0/0 xx.yy.zz.94 1
DAc xx.yy.zz.88/29 ether1 0
DAc 192.168.2.0/24 COMMON_VLAN 0
DAc 192.168.10.0/24 homevpn 0
Is it because the bridge is performing VLAN filtering? The WireGuard interface is not part of the bridge, but adding it wasn’t part of the office-to-office example in the RouterOS documentation, so I assumed it wasn’t necessary. (The WireGuard interface doesn’t appear when autocompleting the interface, so I’m not certain whether it’s intended to be part of a bridge.) All VLAN tagging occurs further downstream at the switch.