I set up the routing as outlined in this guide:
https://help.mikrotik.com/docs/spaces/R ... uardtunnel
I did have the remote site go through a 10.255.255.0/30, I think due to an old guide, but changed the remote route to go directly to the wireguard1 interface during my troubleshooting yesterday. Both work for normal routing site-to-site.
Here's all the relevant configs I can think of. The key point I want to make is that
I can query the mordor dns server from my shire LAN, but FWD requests from shire router don't make it to the mordor dns server.
shire subnet: 172.16.0.0/16
shire gateway/dns server: 172.16.0.1
mordor subnet: 192.168.0.0/24
mordor gateway/dns server: 192.168.0.1
shire routing table:
/ip/route> print
Flags: D - DYNAMIC; X - DISABLED, I - INACTIVE, A - ACTIVE; c - CONNECT, s - STATIC, v - VPN
Columns: DST-ADDRESS, GATEWAY, DISTANCE
# DST-ADDRESS GATEWAY DISTANCE
0 Xs 192.168.0.0/24 10.255.255.2 1
DAv 0.0.0.0/0 pppoe-out1 1
DAc 172.16.0.0/16 bridge 0
DAc 172.17.0.0/24 containers 0
1 As 192.168.0.0/24 wireguard1 1
DAc 192.168.100.0/24 wireguard1 0
DAc 192.168.200.0/24 vlan-dmz 0
DAc 10.255.255.0/30 wireguard1 0
DAc 172.16.16.250/32 pppoe-out1 0
mordor routing table:
/ip route print
Flags: D - DYNAMIC; X - DISABLED, I - INACTIVE, A - ACTIVE; c - CONNECT, s - STATIC;>
Columns: DST-ADDRESS, GATEWAY, DISTANCE
# DST-ADDRESS GATEWAY DISTANCE
0 Xs 172.16.0.0/16 10.255.255.1 1
1 As 0.0.0.0/0 <redacted public IP> 1
2 As 172.16.0.0/16 wireguard1 1
DAc 172.17.0.0/24 containers 0
DAc 192.168.0.0/24 bridge 0
DAc 192.168.66.0/24 wireguard1 0
DAc+ <redacted public IPs> ether1 0
...
DAc+ <redacted public IPs> ether1 0
DAc 10.255.255.0/30 wireguard1 0
I looked closely at the firewall. I include my config here up to the rule that I believe SHOULD ensure that comms from shire router to mordor router.
shire firewall rules:
/ip/firewall> export
# 2025-04-30 10:42:10 by RouterOS 7.18.2
#
# model = RB5009UG+S+
/ip firewall address-list
add address=172.16.0.0/16 comment="shire (LAN) subnet" list=allowed_to_router
add address=192.168.0.0/24 comment="mordor subnet" list=allowed_to_router
add address=172.17.0.0/24 comment="containers subnet" list=allowed_to_router
/ip firewall filter
add action=accept chain=forward comment=TESTTEST dst-address=192.168.0.0/24 src-address=172.16.0.0/16
add action=accept chain=forward comment=TESTTEST dst-address=172.16.0.0/16 src-address=192.168.0.0/24
add action=accept chain=input comment="defconf: established/related connections" connection-state=established,related,untracked
add action=accept chain=forward comment="defconf: accept established,related, untracked" connection-state=established,related,untracked
add action=drop chain=input comment="defconf: drop invalid" connection-state=invalid
add action=drop chain=forward comment="defconf: drop invalid" connection-state=invalid log-prefix=invalid
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" connection-state=established,related hw-offload=yes
add action=accept chain=input comment="defconf: accept to local loopback (for CAPsMAN)" dst-address=127.0.0.1
add action=accept chain=input comment="wireguard server" dst-port=443 in-interface-list=WAN protocol=udp
add action=accept chain=forward dst-address=192.168.0.1 dst-port=53 log=yes log-prefix=DNS-TEST protocol=udp
add action=accept chain=input comment="allowed IPs -> router" src-address-list=allowed_to_router
...
I think all rules enabling dns-to-dns traffic are included above
mordor firewall rules:
/ip firewall export
# 2025-04-30 03:47:40 by RouterOS 7.18.2
#
# model = RB5009UG+S+
/ip firewall address-list
add address=192.168.0.0/24 comment="mordor (LAN) subnet" list=allowed_to_router
add address=172.16.0.0/16 comment="shire subnet" list=allowed_to_router
add address=172.17.0.0/24 comment=containers list=allowed_to_router
/ip firewall connection tracking
set udp-timeout=10s
/ip firewall filter
add action=accept chain=input comment="defconf: accept established,related,untracked" connection-state=established,related,untracked
add action=accept chain=forward comment=TESTTEST dst-address=172.16.0.0/16 src-address=192.168.0.0/24
add action=accept chain=forward comment=TESTTEST dst-address=192.168.0.0/24 src-address=172.16.0.0/16
add action=accept chain=forward comment="defconf: accept established,related, untracked" connection-state=established,related,untracked
add action=drop chain=input comment="defconf: drop invalid" connection-state=invalid
add action=drop chain=forward comment="defconf: drop invalid" connection-state=invalid
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" connection-state=established,related hw-offload=yes
add action=accept chain=forward comment="WG shire DNS -> mordor DNS" dst-address=192.168.0.1 in-interface=wireguard1 out-interface-list=LAN \
src-address=172.16.0.1
add action=accept chain=input comment="defconf: accept to local loopback (for CAPsMAN)" dst-address=127.0.0.1
add action=accept chain=input comment="wireguard server" dst-port=443 in-interface-list=WAN protocol=udp
add action=accept chain=input comment="allowed IPs -> router" src-address-list=allowed_to_router
...
I think all rules enabling dns-to-dns traffic are included above
shire dns settings:
I have no concern here, as it's behaving here exactly as I expect. Logs show it is forwarding queries for gw.mordor to 192.168.0.1.
/ip dns export
# 2025-04-30 10:50:45 by RouterOS 7.18.2
#
# model = RB5009UG+S+
/ip dns forwarders
add dns-servers=172.16.1.100 name=pi-hole
add dns-servers=192.168.0.1 name=mordor verify-doh-cert=no
/ip dns
set allow-remote-requests=yes servers=172.16.1.100,1.1.1.1
/ip dns static
add forward-to=192.168.0.1 match-subdomain=yes name=mordor type=FWD
add address=172.16.0.1 comment=defconf name=router.lan type=A
add address=172.16.0.1 name=gw.shire type=A
mordor dns settings:
I have no concern here, as it's also behaving exactly as I expect. Logs show it receiving queries sent directly to it from shire subnet, but logs don't show any queries received when they're forwarded by shire dns server.
/ip dns export
# 2025-04-30 03:53:44 by RouterOS 7.18.2
#
# model = RB5009UG+S+
/ip dns
set allow-remote-requests=yes servers=208.97.48.10,208.97.49.10
/ip dns static
add address=192.168.0.1 comment=defconf name=router.lan type=A
add address=192.168.0.1 comment="Mikrotik Gateway WebUI" name=gw.mordor type=A
Finally, here's the relevant wireguard configs. The wireguard tunnel has no concerns from my perspective.
shire wireguard export:
/interface wireguard export
# 2025-04-30 10:55:09 by RouterOS 7.18.2
#
# model = RB5009UG+S+
/interface wireguard
add listen-port=443 mtu=1420 name=wireguard1
/interface wireguard peers
...
add allowed-address=192.168.0.1/24,10.255.255.0/24 comment="mordor subnet" endpoint-address=<redacted> endpoint-port=443 interface=\
wireguard1 name=peer4 public-key="<redacted>"
...
mordor wireguard export:
/interface/wireguard/export
# 2025-04-30 03:57:05 by RouterOS 7.18.2
#
# model = RB5009UG+S+
/interface wireguard
add listen-port=443 mtu=1420 name=wireguard1
/interface wireguard peers
...
add allowed-address=172.16.0.0/16,10.255.255.0/24 comment="shire -> mordor" endpoint-address=<redacted> endpoint-port=443 \
interface=wireguard1 name=peer4 public-key="<redacted>"