Hi,
I am trying to complete a config with a VLAN being routed over a wireguard connection. In version 6 I set the mangle rules marked the routing and I could connect through a VPN. I am not getting the same results with 7, the Wireguard connection handshakes but I am not able to route the VLAN 20 over it.
# jan/27/2023 11:37:55 by RouterOS 7.7
# software id = 4ASX-S75S
#
# model = RBD53iG-5HacD2HnD
# serial number = F34E0F15C598
/interface bridge
add admin-mac=DC:2C:6E:BA:50:78 auto-mac=no comment=defconf name=bridge \
vlan-filtering=yes
/interface wireguard
add listen-port=9929 mtu=1400 name=wireguard1
/interface vlan
add interface=bridge name=LANvlan10 vlan-id=10
add interface=bridge name=MGT vlan-id=99
add interface=bridge name=UKvlan20 vlan-id=20
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
add name=VLAN
/interface wifiwave2 channel
add frequency=2412,2432,2472 name=ch-2ghz width=20mhz
add frequency=5180,5260,5500 name=ch-5ghz width=20/40/80mhz
/interface wifiwave2 security
add authentication-types=wpa2-psk,wpa3-psk name=lan-sec
add authentication-types=wpa2-psk,wpa3-psk name=uk-sec
/interface wifiwave2 configuration
add country=France mode=ap name=conf_24 security=lan-sec ssid=lan
add channel=ch-5ghz country=France mode=ap name=conf_5 security=lan-sec ssid=\
lan
/interface wifiwave2
set [ find default-name=wifi1 ] channel=ch-2ghz channel.band=2ghz-n \
.skip-dfs-channels=10min-cac .width=20/40mhz configuration=conf_24 \
configuration.mode=ap disabled=no security=lan-sec
set [ find default-name=wifi2 ] channel.band=5ghz-ac .skip-dfs-channels=\
10min-cac .width=20/40/80mhz configuration=conf_24 configuration.mode=ap \
disabled=no
add channel=ch-2ghz configuration=conf_24 configuration.mode=ap disabled=no \
mac-address=DE:2C:6E:BA:50:7C master-interface=wifi1 name=wifi3 security=\
lan-sec
add channel=ch-5ghz configuration=conf_5 configuration.mode=ap disabled=no \
mac-address=DE:2C:6E:BA:50:7D master-interface=wifi2 name=wifi4 security=\
lan-sec
/ip pool
add name=dhcp_pool1 ranges=192.168.10.20-192.168.10.254
add name=dhcp_pool2 ranges=192.168.20.20-192.168.20.254
add name=dhcp_pool3 ranges=192.168.99.20-192.168.99.254
/ip dhcp-server
add address-pool=dhcp_pool1 interface=LANvlan10 name=dhcp1
add address-pool=dhcp_pool2 interface=UKvlan20 name=dhcp2
add address-pool=dhcp_pool3 interface=MGT name=dhcp3
/lora servers
add address=eu.mikrotik.thethings.industries down-port=1700 name=TTN-EU \
up-port=1700
add address=us.mikrotik.thethings.industries down-port=1700 name=TTN-US \
up-port=1700
add address=eu1.cloud.thethings.industries down-port=1700 name=\
"TTS Cloud (eu1)" up-port=1700
add address=nam1.cloud.thethings.industries down-port=1700 name=\
"TTS Cloud (nam1)" up-port=1700
add address=au1.cloud.thethings.industries down-port=1700 name=\
"TTS Cloud (au1)" up-port=1700
add address=eu1.cloud.thethings.network down-port=1700 name="TTN V3 (eu1)" \
up-port=1700
add address=nam1.cloud.thethings.network down-port=1700 name="TTN V3 (nam1)" \
up-port=1700
add address=au1.cloud.thethings.network down-port=1700 name="TTN V3 (au1)" \
up-port=1700
/routing table
add disabled=no fib name=UK
/interface bridge port
add bridge=bridge comment=defconf frame-types=\
admit-only-untagged-and-priority-tagged interface=ether2 pvid=10
add bridge=bridge comment=defconf frame-types=\
admit-only-untagged-and-priority-tagged interface=ether3 pvid=10
add bridge=bridge comment=defconf frame-types=\
admit-only-untagged-and-priority-tagged interface=ether4 pvid=20
add bridge=bridge comment=defconf frame-types=\
admit-only-untagged-and-priority-tagged interface=wifi1 pvid=10
add bridge=bridge comment=defconf frame-types=\
admit-only-untagged-and-priority-tagged interface=wifi2 pvid=10
add bridge=bridge frame-types=admit-only-untagged-and-priority-tagged \
interface=wifi3 pvid=20
add bridge=bridge frame-types=admit-only-untagged-and-priority-tagged \
interface=wifi4 pvid=20
/ip neighbor discovery-settings
set discover-interface-list=all
/interface bridge vlan
add bridge=bridge tagged=bridge untagged=ether2 vlan-ids=10
add bridge=bridge tagged=ether2,bridge vlan-ids=20
/interface list member
add comment=defconf interface=bridge list=LAN
add comment=defconf interface=ether1 list=WAN
add interface=ether5 list=LAN
add interface=LANvlan10 list=LAN
add interface=UKvlan20 list=LAN
add interface=wireguard1 list=WAN
add interface=MGT list=LAN
/interface wireguard peers
add allowed-address=0.0.0.0/0,::/0 endpoint-address=xxxxxxxxxxxxxxxxxx \
endpoint-port=9929 interface=wireguard1 persistent-keepalive=25s \
public-key="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
/ip address
add address=192.168.99.1/24 interface=MGT network=192.168.99.0
add address=192.168.10.1/24 interface=LANvlan10 network=192.168.10.0
add address=192.168.20.1/24 interface=UKvlan20 network=192.168.20.0
add address=172.27.97.181 interface=wireguard1 network=172.27.97.181
/ip dhcp-client
add comment=defconf interface=ether1
/ip dhcp-server network
add address=192.168.10.0/24 gateway=192.168.10.1
add address=192.168.20.0/24 dns-server=46.227.67.134,192.165.9.158 gateway=\
192.168.20.1
add address=192.168.99.0/24 gateway=192.168.99.1
/ip dns
set allow-remote-requests=yes
/ip dns static
add address=192.168.88.1 comment=defconf name=router.lan
/ip firewall filter
add action=accept chain=input comment=Wireguard dst-port=9929 protocol=udp
add action=accept chain=input 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=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
/ip firewall mangle
add action=mark-routing chain=prerouting new-routing-mark=UK passthrough=yes \
src-address=192.168.20.0/24
/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade" \
ipsec-policy=out,none out-interface-list=WAN
add action=masquerade chain=srcnat out-interface=wireguard1
/ip route
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=wireguard1 pref-src=\
"" routing-table=UK scope=30 suppress-hw-offload=no target-scope=10 \
/ipv6 firewall address-list
add address=::/128 comment="defconf: unspecified address" list=bad_ipv6
add address=::1/128 comment="defconf: lo" list=bad_ipv6
add address=fec0::/10 comment="defconf: site-local" list=bad_ipv6
add address=::ffff:0.0.0.0/96 comment="defconf: ipv4-mapped" list=bad_ipv6
add address=::/96 comment="defconf: ipv4 compat" list=bad_ipv6
add address=100::/64 comment="defconf: discard only " list=bad_ipv6
add address=2001:db8::/32 comment="defconf: documentation" list=bad_ipv6
add address=2001:10::/28 comment="defconf: ORCHID" list=bad_ipv6
add address=3ffe::/16 comment="defconf: 6bone" list=bad_ipv6
/ipv6 firewall filter
add action=accept chain=input 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=accept chain=input comment="defconf: accept ICMPv6" protocol=\
icmpv6
add action=accept chain=input comment="defconf: accept UDP traceroute" port=\
33434-33534 protocol=udp
add action=accept chain=input comment=\
"defconf: accept DHCPv6-Client prefix delegation." dst-port=546 protocol=\
udp src-address=fe80::/10
add action=accept chain=input comment="defconf: accept IKE" dst-port=500,4500 \
protocol=udp
add action=accept chain=input comment="defconf: accept ipsec AH" protocol=\
ipsec-ah
add action=accept chain=input comment="defconf: accept ipsec ESP" protocol=\
ipsec-esp
add action=accept chain=input comment=\
"defconf: accept all that matches ipsec policy" ipsec-policy=in,ipsec
add action=drop chain=input comment=\
"defconf: drop everything else not coming from LAN" in-interface-list=\
!LAN
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 packets with bad src ipv6" src-address-list=bad_ipv6
add action=drop chain=forward comment=\
"defconf: drop packets with bad dst ipv6" dst-address-list=bad_ipv6
add action=drop chain=forward comment="defconf: rfc4890 drop hop-limit=1" \
hop-limit=equal:1 protocol=icmpv6
add action=accept chain=forward comment="defconf: accept ICMPv6" protocol=\
icmpv6
add action=accept chain=forward comment="defconf: accept HIP" protocol=139
add action=accept chain=forward comment="defconf: accept IKE" dst-port=\
500,4500 protocol=udp
add action=accept chain=forward comment="defconf: accept ipsec AH" protocol=\
ipsec-ah
add action=accept chain=forward comment="defconf: accept ipsec ESP" protocol=\
ipsec-esp
add action=accept chain=forward comment=\
"defconf: accept all that matches ipsec policy" ipsec-policy=in,ipsec
add action=drop chain=forward comment=\
"defconf: drop everything else not coming from LAN" in-interface-list=\
!LAN
/routing rule
add action=lookup disabled=no src-address=192.168.20.0/24 table=UK
/system clock
set time-zone-name=Europe/Paris
/system identity
set name=Aoint
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN
If anyone could help me see where I have tripped up - I would be very greatful.