I am sorry to bring up this topic, but I am having a funny issue with this. On my home set up with a RB750Gr3(admittedly using an older firmware: 7.15rc5) I have no issues with having my Wireguard connection be active even when I am on my home LAN addresses. This is also true for my Windows laptop where the allowed IPs are set to 0.0.0.0/0 and "Block untunneled traffic" is active.
However on my office network which uses RB760iGS with the firmware 7.19.3, I am unable to connect to local LAN as described here when the wireguard connection is active. I have attached both my home and work configuration as to me it seems that both firewalls are set up similarly and both should have the same behavior. Granted there is a firmware difference between the two, but I do not understand how/why my home set up is able to accept Wireguard connection while on LAN, while the office does not.
Ideally I would like to have my work network to behave similar to how it is at my home i.e. able to accept Wireguard connection even on LAN as my office are currently trying to have all our work laptops to be always connected to the Wireguard connection. Appreciate your help on this.
Home Configuration
# software id = Z762-KPNE
#
# model = RB750Gr3
/interface bridge
add admin-mac="" auto-mac=no comment=defconf name=bridge pvid=\
999 vlan-filtering=yes
/interface wireguard
add disabled=yes listen-port=13232 mtu=1420 name=A7
add listen-port=13231 mtu=1420 name=WG_Home
add listen-port=51820 mtu=1420 name=surfsharkVPN
/interface vlan
add interface=ether1 name=UInternet vlan-id=500
add interface=bridge name=vlan_ExternalDMZ vlan-id=7
add interface=bridge name=vlan_FFBabyFood vlan-id=20
add interface=bridge name=vlan_Guest_IOT vlan-id=5
add interface=bridge name=vlan_HomeLAN vlan-id=15
add interface=bridge name=vlan_ServerNetwork vlan-id=12
add comment="Surfshark Local" interface=bridge name=vlan_SurfsharkES vlan-id=\
252
add comment="Testing VLAN" interface=bridge name=vlan_Testing vlan-id=32
add comment=defaultBridge interface=bridge name=vlan_defBridge vlan-id=999
/interface bonding
add mode=802.3ad name=BondTest slaves=ether4,ether3
/interface pppoe-client
add add-default-route=yes disabled=no interface=UInternet name=\
pppoe-out1 use-peer-dns=yes
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
add name=MGMT
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip pool
add name=LanPool ranges=192.168.88.10-192.168.88.254
add name=HomePool ranges=192.168.10.10-192.168.10.254
add name=GuestIOTPool ranges=10.0.15.20-10.0.15.65
add name=FFBabyFood ranges=10.0.20.20-10.0.20.25
add name=DMZ ranges=172.25.60.5-172.25.60.15
add name=ServerPool ranges=10.30.12.89-10.30.12.95
add name=TestingPool ranges=172.35.85.50-172.35.85.65
add name=surfsharkES ranges=172.25.2.15-172.25.2.30
/ip dhcp-server
add address-pool=LanPool interface=vlan_defBridge lease-time=10m name=LAN
add address-pool=GuestIOTPool interface=vlan_Guest_IOT lease-time=10m name=\
Guest_IOT_DHCP
add address-pool=FFBabyFood interface=vlan_FFBabyFood name="FF Network"
add address-pool=DMZ interface=vlan_ExternalDMZ lease-time=10m name=DMZ
add address-pool=HomePool interface=vlan_HomeLAN lease-time=10m name=Home
add address-pool=ServerPool interface=vlan_ServerNetwork name=\
"Server Network"
add address-pool=TestingPool interface=vlan_Testing name=Test
add address-pool=surfsharkES interface=vlan_SurfsharkES lease-time=10m name=\
surfshark_local
/routing table
add disabled=no fib name=TO-Surfshark
/disk settings
set auto-media-interface=bridge auto-media-sharing=yes auto-smb-sharing=yes
/interface bridge port
add bridge=bridge comment=defconf interface=ether2 pvid=15
add bridge=bridge interface=BondTest pvid=12
add bridge=bridge interface=ether5 pvid=12
/ip neighbor discovery-settings
set discover-interface-list=MGMT
/ipv6 settings
set disable-ipv6=yes
/interface bridge vlan
add bridge=bridge tagged=BondTest,bridge vlan-ids=5
add bridge=bridge tagged=BondTest,bridge vlan-ids=7
add bridge=bridge tagged=BondTest,bridge vlan-ids=20
add bridge=bridge tagged=BondTest,bridge untagged=ether2 vlan-ids=15
add bridge=bridge tagged=bridge,BondTest untagged=ether5 vlan-ids=12
add bridge=bridge tagged=bridge,BondTest vlan-ids=32
add bridge=bridge tagged=bridge vlan-ids=999
add bridge=bridge tagged=bridge,BondTest vlan-ids=252
/interface list member
add comment=defconf interface=ether1 list=WAN
add interface=pppoe-out1 list=WAN
add interface=vlan_HomeLAN list=LAN
add interface=WG_Home list=LAN
add interface=UInternet list=WAN
add interface=vlan_ExternalDMZ list=LAN
add interface=vlan_FFBabyFood list=LAN
add interface=vlan_Guest_IOT list=LAN
add interface=vlan_ServerNetwork list=LAN
add interface=vlan_Testing list=LAN
add interface=vlan_HomeLAN list=MGMT
add interface=WG_Home list=MGMT
add interface=vlan_defBridge list=LAN
add interface=vlan_ServerNetwork list=MGMT
add interface=vlan_SurfsharkES list=LAN
add interface=surfsharkVPN list=WAN
/interface wireguard peers
add allowed-address=192.168.15.15/32 comment="S24 FE via Surfshark" \
interface=WG_Home name=ss_S24FE persistent-keepalive=25s public-key=\
"A"
add allowed-address=0.0.0.0/0 comment=VPN_JP disabled=yes endpoint-address=\
jp-tok.prod.surfshark.com endpoint-port=51820 interface=surfsharkVPN \
name=surfshark_JP public-key=\
"B"
add allowed-address=0.0.0.0/0 comment=VPN_ES disabled=yes endpoint-address=\
ee-tll.prod.surfshark.com endpoint-port=51820 interface=surfsharkVPN \
name=surfshark_ES public-key=\
"C"
add allowed-address=0.0.0.0/0 comment=VPN_MY disabled=yes endpoint-address=\
185.196.0.8 endpoint-port=51820 interface=surfsharkVPN name=surfshark_MY \
public-key="D"
add allowed-address=192.168.15.45/32 interface=WG_Home name=S24FE \
persistent-keepalive=25s public-key=\
"E"
add allowed-address=0.0.0.0/0 comment=VPN_UK disabled=yes endpoint-address=\
uk-man.prod.surfshark.com endpoint-port=51820 interface=surfsharkVPN \
name=surfshark_UK public-key=\
"F"
add allowed-address=0.0.0.0/0 comment=VPN_TW endpoint-address=\
tw-tai.prod.surfshark.com endpoint-port=51820 interface=surfsharkVPN \
name=surfshark_TW public-key=\
"G"
add allowed-address=0.0.0.0/0 comment=VPN_SG disabled=yes endpoint-address=\
sg-sng.prod.surfshark.com endpoint-port=51820 interface=surfsharkVPN \
name=surfshark_SG public-key=\
"H"
add allowed-address=192.168.15.40/32 interface=WG_Home name=ss_iPad \
persistent-keepalive=25s public-key=\
"I"
add allowed-address=192.168.15.20/32 interface=WG_Home name=iphone \
public-key="J"
add allowed-address=10.7.1.0/24,10.7.3.0/24,192.168.15.10/32 comment=\
"hAP Mini" interface=WG_Home name=hAP_travel public-key=\
"K"
add allowed-address=192.168.15.24/32 comment="ipad" interface=\
WG_Home name=ipad persistent-keepalive=25s public-key=\
"L"
add allowed-address=192.168.15.25/32 comment="laptop" interface=WG_Home \
name=laptop persistent-keepalive=25s public-key=\
"M"
/ip address
add address=192.168.10.1/24 comment=HomeLan interface=vlan_HomeLAN network=\
192.168.10.0
add address=10.0.15.1/24 comment=Guest_IOT interface=vlan_Guest_IOT network=\
10.0.15.0
add address=172.25.60.1/24 comment="External DMZ" interface=vlan_ExternalDMZ \
network=172.25.60.0
add address=10.0.20.1/24 comment="FF Baby Food Network" interface=\
vlan_FFBabyFood network=10.0.20.0
add address=192.168.88.1/24 comment=defcon interface=vlan_defBridge network=\
192.168.88.0
add address=192.168.15.1/24 comment=HomeWG interface=WG_Home network=\
192.168.15.0
add address=172.25.65.1/24 comment="Wireguard Family" interface=Andaman7 \
network=172.25.65.0
add address=10.30.12.1/24 comment="Server Network" interface=\
vlan_ServerNetwork network=10.30.12.0
add address=172.30.85.1/24 comment="For Experiment and Testing" interface=\
vlan_Testing network=172.30.85.0
add address=172.25.2.1/24 comment=SurfsharkVPN_local interface=\
vlan_SurfsharkES network=172.25.2.0
add address=10.14.0.2/16 interface=surfsharkVPN network=10.14.0.0
/ip cloud
set ddns-enabled=yes ddns-update-interval=1m
/ip dhcp-client
add comment=defconf disabled=yes interface=ether1
/ip dhcp-server lease
add address=10.0.15.20 comment="Xiaomi Mi Box" \
server=Guest_IOT_DHCP
add address=192.168.10.61 comment=Desktop \
server=Home
add address=10.30.12.89 comment=\
"HP DL360p Gen9 ILO" server=\
"Server Network"
add address=10.0.20.23 comment=\
"FF Dolibarr Server" server="FF Network"
add address=172.25.60.5 comment=\
"Alpine DMZ Server" server=DMZ
/ip dhcp-server network
add address=10.0.15.0/24 comment=Guest_IOT dns-server=1.1.1.1,8.8.8.8 \
gateway=10.0.15.1
add address=10.0.20.0/24 comment=ffbabyfood gateway=10.0.20.1
add address=10.30.12.0/24 comment=servers dns-server=\
10.30.12.49,192.168.10.49 domain=lab.yy.xyz gateway=10.30.12.1
add address=172.25.2.0/24 dns-server=x.x.x.x,y.y.y.y gateway=\
172.25.2.1
add address=172.25.60.0/24 comment=dmz gateway=172.25.60.1
add address=172.30.85.0/24 comment="htest" gateway=172.30.85.1
add address=192.168.10.0/24 comment=HomeLAN dns-server=\
10.30.12.49,192.168.10.49 domain=eee.yyy.xyz gateway=192.168.10.1
add address=192.168.88.0/24 comment=defcon dns-server=192.168.88.1 gateway=\
192.168.88.1
/ip dns
set allow-remote-requests=yes servers=100:8:101:101:600:ff08:c303:0
/ip dns static
add address=192.168.88.1 comment=defconf name=router.lan
/ip firewall address-list
add address=10.0.15.0/24 list="Guest IOT Network"
add address=xxx.sn.mynetname.net list=WAN
add address=10.30.12.0/24 list=TRUSTED
add address=192.168.88.0/24 list=NoInternet
add address=192.168.10.0/24 list=TRUSTED
add address=192.168.15.0/24 list=TRUSTED
add address=10.0.20.0/24 list=NoInternet
add address=172.25.60.0/24 list=NoInternet
add address=172.25.2.0/24 list=VPNRouted
add address=192.168.10.0/24 list=LAN
add address=10.30.12.0/24 list=LAN
add address=172.25.60.0/24 list=LAN
add address=10.0.20.0/24 list=LAN
add address=10.0.15.0/24 list=LAN
add address=172.25.2.0/24 list=LAN
add address=172.30.85.0/24 list=LAN
add address=192.168.15.15 list=VPNRouted
add address=172.25.2.0/24 list=NoInternet
add address=192.168.10.61 disabled=yes list=VPNRouted
add address=192.168.15.40 list=VPNRouted
add address=173.245.48.0/20 list=cloudflare-ips
add address=103.21.244.0/22 list=cloudflare-ips
add address=103.22.200.0/22 list=cloudflare-ips
add address=103.31.4.0/22 list=cloudflare-ips
add address=141.101.64.0/18 list=cloudflare-ips
add address=108.162.192.0/18 list=cloudflare-ips
add address=190.93.240.0/20 list=cloudflare-ips
add address=188.114.96.0/20 list=cloudflare-ips
add address=197.234.240.0/22 list=cloudflare-ips
add address=198.41.128.0/17 list=cloudflare-ips
add address=162.158.0.0/15 list=cloudflare-ips
add address=104.16.0.0/13 list=cloudflare-ips
add address=104.24.0.0/14 list=cloudflare-ips
add address=172.64.0.0/13 list=cloudflare-ips
add address=131.0.72.0/22 list=cloudflare-ips
/ip 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 ICMP" protocol=icmp
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="Allow Wireguard" dst-port=13231 \
protocol=udp
add action=accept chain=input comment="admin access" in-interface-list=MGMT \
src-address-list=TRUSTED
add action=accept chain=input comment="users to services" dst-port=53 \
in-interface-list=LAN protocol=udp
add action=accept chain=input comment="users to services" dst-port=53 \
in-interface-list=LAN protocol=tcp
add action=drop chain=input comment="drop all input"
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" \
connection-mark=no-mark 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=accept chain=forward out-interface=surfsharkVPN
add action=accept chain=forward comment="internet traffic, Alpine DMZ" \
in-interface-list=LAN out-interface=pppoe-out1 src-address=172.25.60.5
add action=drop chain=forward disabled=yes dst-address-list="" out-interface=\
pppoe-out1 src-address=192.168.10.35
add action=accept chain=forward comment="allow DNS for Unbound" dst-port=53 \
out-interface=pppoe-out1 protocol=tcp src-address=10.30.12.55
add action=accept chain=forward comment="allow DNS for Unbound" dst-port=53 \
out-interface=pppoe-out1 protocol=udp src-address=10.30.12.55
add action=accept chain=forward comment="allow DNS for rPI" dst-port=53 \
out-interface=pppoe-out1 protocol=tcp src-address=192.168.10.49
add action=accept chain=forward comment="allow DNS for rPI" dst-port=53 \
out-interface=pppoe-out1 protocol=udp src-address=192.168.10.49
add action=drop chain=forward comment="drop all external DNS" dst-port=53 \
log=yes log-prefix=DNS_Dropped_ out-interface=pppoe-out1 protocol=tcp \
src-address-list=TRUSTED
add action=drop chain=forward comment="drop all external DNS" dst-port=53 \
log-prefix=DNS_Dropped_ out-interface=pppoe-out1 protocol=udp \
src-address-list=TRUSTED
add action=drop chain=forward comment="drop all external DNS over TLS/QUIC" \
dst-port=853 log=yes log-prefix=DNS_Dropped_ out-interface=pppoe-out1 \
protocol=tcp src-address-list=TRUSTED
add action=drop chain=forward comment="drop all external DNS over TLS/QUIC" \
dst-port=853 log=yes log-prefix=DNS_Dropped_ out-interface=pppoe-out1 \
protocol=udp src-address-list=TRUSTED
add action=accept chain=forward comment=\
"internet traffic, Block NoInternet List, allow everything else" \
in-interface-list=LAN out-interface=pppoe-out1 src-address-list=\
!NoInternet
add action=accept chain=forward comment="admin access" in-interface-list=MGMT \
out-interface-list=LAN src-address-list=TRUSTED
add action=accept chain=forward comment="allow \
\npingvin" dst-address=10.30.12.93 dst-port=13461 protocol=tcp \
src-address=172.25.60.5
add action=accept chain=forward comment="allow \
\ngramps" dst-address=10.30.12.93 dst-port=60421 protocol=tcp \
src-address=172.25.60.5
add action=accept chain=forward comment="allow dstnat connection" \
connection-nat-state=dstnat
add action=drop chain=forward comment="Drop IOT to Tomato Router" \
dst-address=10.0.15.4 src-address-list="Guest IOT Network"
add action=drop chain=forward comment="drop all else"
/ip firewall mangle
add action=change-mss chain=forward disabled=yes new-mss=clamp-to-pmtu \
out-interface=surfsharkVPN passthrough=yes protocol=tcp tcp-flags=syn
add action=mark-routing chain=prerouting connection-state=new disabled=yes \
dst-address-list=!LAN new-routing-mark=TO-Surfshark passthrough=no \
src-address-list=VPNRouted
add action=accept chain=prerouting connection-mark=no-mark connection-state=\
established,related
add action=accept chain=prerouting connection-state=established,related \
in-interface-list=WAN
add action=mark-routing chain=prerouting connection-mark=Surfshark-connection \
new-routing-mark=TO-Surfshark passthrough=no
add action=mark-connection chain=prerouting connection-state=new \
dst-address-list=!LAN new-connection-mark=Surfshark-connection \
passthrough=yes src-address-list=VPNRouted
add action=accept chain=prerouting connection-state=established,related \
in-interface-list=WAN
add action=mark-routing chain=prerouting connection-mark=Surfshark-connection \
new-routing-mark=TO-Surfshark passthrough=no
/ip firewall nat
add action=dst-nat chain=dstnat disabled=yes dst-address-list=WAN dst-port=\
443 protocol=tcp to-addresses=172.25.60.5 to-ports=443
add action=dst-nat chain=dstnat disabled=yes dst-address-list=WAN dst-port=\
21115 protocol=tcp to-addresses=10.30.12.93 to-ports=21115
add action=dst-nat chain=dstnat disabled=yes dst-address-list=WAN dst-port=\
21116 protocol=tcp to-addresses=10.30.12.93 to-ports=21116
add action=dst-nat chain=dstnat disabled=yes dst-address-list=WAN dst-port=\
21116 protocol=udp to-addresses=10.30.12.93 to-ports=21116
add action=dst-nat chain=dstnat disabled=yes dst-address-list=WAN dst-port=\
21117 protocol=tcp to-addresses=10.30.12.93 to-ports=21117
add action=dst-nat chain=dstnat dst-port=443 in-interface=pppoe-out1 log=yes \
log-prefix=CF_443_ protocol=tcp src-address-list=cloudflare-ips \
to-addresses=172.25.60.5 to-ports=443
add action=masquerade chain=srcnat comment="defconf: masquerade" \
ipsec-policy=out,none out-interface=surfsharkVPN
add action=masquerade chain=srcnat comment="defconf: masquerade" \
ipsec-policy=out,none out-interface=pppoe-out1
add action=dst-nat chain=dstnat disabled=yes dst-port=80 in-interface=\
pppoe-out1 log=yes log-prefix=CF_80_ protocol=tcp src-address-list=\
cloudflare-ips to-addresses=172.25.60.2 to-ports=80
add action=dst-nat chain=dstnat disabled=yes dst-port=53 log-prefix=DNS_Home_ \
protocol=udp src-address-list=TRUSTED to-addresses=192.168.10.49
add action=dst-nat chain=dstnat disabled=yes dst-address-list=10.30.12.49 \
dst-port=53 in-interface=vlan_HomeLAN log-prefix=DNS_Home_ protocol=tcp \
src-address-list=!192.168.10.49 to-addresses=10.30.12.1 to-ports=53
/ip hotspot profile
set [ find default=yes ] html-directory=hotspot
/ip route
add disabled=no distance=1 dst-address=10.50.16.0/24 gateway=172.25.60.11 \
routing-table=main scope=30 suppress-hw-offload=no target-scope=10
add disabled=no distance=1 dst-address=10.7.3.0/24 gateway=WG_Home \
routing-table=main suppress-hw-offload=no
add disabled=no distance=1 dst-address=10.225.0.0/16 gateway=10.26.255.254 \
routing-table=main scope=30 suppress-hw-offload=no target-scope=10
add check-gateway=none disabled=no distance=1 dst-address=0.0.0.0/0 gateway=\
surfsharkVPN pref-src="" routing-table=TO-Surfshark scope=30 \
suppress-hw-offload=no target-scope=10
/ip service
set www-ssl disabled=no
/ip traffic-flow
set interfaces=LAN
/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
add address=2400:cb00::/32 list=cloudflare-ips-v6
add address=2606:4700::/32 list=cloudflare-ips-v6
add address=2803:f800::/32 list=cloudflare-ips-v6
add address=2405:b500::/32 list=cloudflare-ips-v6
add address=2405:8100::/32 list=cloudflare-ips-v6
add address=2a06:98c0::/29 list=cloudflare-ips-v6
add address=2c0f:f248::/32 list=cloudflare-ips-v6
/ipv6 firewall filter
add action=drop chain=input comment="defconf: drop invalid"
add action=drop chain=forward comment=\
"defconf: drop everything else not coming from LAN"
/system clock
set time-zone-name=Asia/Kuala_Lumpur
/system logging
set 0 topics=info,!wireguard
/system note
set show-at-login=no
/system scheduler
add interval=1d name=d3-cf-dl on-event=d3-cloudflare-download policy=\
ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
start-date=2000-01-01 start-time=00:05:00
add interval=1d name=d3-cf-rp on-event=d3-cloudflare-replace policy=\
ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
start-date=2000-01-01 start-time=00:10:00
add interval=1d name=d3-cf-dl-v6 on-event=d3-cloudflare-download-v6 policy=\
ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
start-date=2000-01-01 start-time=00:05:00
add interval=1d name=d3-cf-rp-v6 on-event=d3-cloudflare-replace-v6 policy=\
ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
start-date=2000-01-01 start-time=00:10:00
/system script
add dont-require-permissions=no name=d3-cloudflare-download owner=admin \
policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
source="\
\n:log info \"Download Cloudflare IP list\";\
\n/tool fetch url=\"https://raw.githubusercontent.com/Davie3/mikrotik-clou\
dflare-iplist/main/cloudflare-ips-v4.rsc\" mode=https dst-path=cloudflare-\
ips-v4.rsc;\
\n"
add dont-require-permissions=no name=d3-cloudflare-replace owner=admin \
policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
source="\
\n:log info \"Remove current Cloudflare IPs\";\
\n/ip firewall address-list remove [find where list=\"cloudflare-ips\"];\
\n:log info \"Import newest Cloudflare IPs\";\
\n/import file-name=cloudflare-ips-v4.rsc;\
\n"
add dont-require-permissions=no name=d3-cloudflare-download-v6 owner=admin \
policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
source="\
\n:log info \"Download Cloudflare IP list (v6)\";\
\n/tool fetch url=\"https://raw.githubusercontent.com/Davie3/mikrotik-clou\
dflare-iplist/main/cloudflare-ips-v6.rsc\" mode=https dst-path=cloudflare-\
ips-v6.rsc;\
\n"
add dont-require-permissions=no name=d3-cloudflare-replace-v6 owner=admin \
policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
source="\
\n:log info \"Remove current Cloudflare IPs (v6)\";\
\n/ip firewall address-list remove [find where list=\"cloudflare-ips-v6\"]\
;\
\n:log info \"Import newest Cloudflare IPs (v6)\";\
\n/import file-name=cloudflare-ips-v6.rsc;\
\n"
/tool mac-server
set allowed-interface-list=none
/tool mac-server mac-winbox
set allowed-interface-list=MGMT
Work Configuration
/interface bridge
add admin-mac="" auto-mac=no comment=defconf name=bridge vlan-filtering=yes
/interface wireguard
add listen-port=16226 mtu=1420 name=wg_s2s
/interface vlan
add interface=ether1 name=vlan1 vlan-id=500
add interface=bridge name=vlan_A vlan-id=4
add interface=bridge name=vlan_E vlan-id=30
add interface=bridge name=vlan_H vlan-id=14
add interface=bridge name=vlanbridge vlan-id=11
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
add name=MGMT
/ip pool
add name=default-dhcp ranges=192.168.48.10-192.168.48.254
add name=adrPool_A ranges=10.89.4.10-10.89.4.29
add name=adrPool_H ranges=10.89.14.10-10.89.14.254
add name=adrPool_E ranges=172.30.14.10-172.30.14.69
/ip dhcp-server
add address-pool=default-dhcp interface=vlanbridge name=defconf
add address-pool=adrPool_A interface=vlan_A name=dhcp1
add address-pool=adrPool_E interface=vlan_E name=dhcp2
add address-pool=adrPool_H interface=vlan_H name=dhcp3
/disk settings
set auto-media-interface=bridge auto-media-sharing=yes auto-smb-sharing=yes
/interface bridge port
add bridge=bridge comment=defconf frame-types=admit-only-untagged-and-priority-tagged interface=ether2 pvid=4
add bridge=bridge comment=defconf frame-types=admit-only-untagged-and-priority-tagged interface=ether3 pvid=14
add bridge=bridge comment=defconf frame-types=admit-only-untagged-and-priority-tagged interface=ether4 pvid=30
add bridge=bridge comment=defconf frame-types=admit-only-untagged-and-priority-tagged interface=ether5 pvid=14
add bridge=bridge comment=defconf frame-types=admit-only-untagged-and-priority-tagged interface=sfp1 pvid=11
/ip neighbor discovery-settings
set discover-interface-list=MGMT
/interface bridge vlan
add bridge=bridge tagged=bridge untagged=ether4 vlan-ids=30
add bridge=bridge tagged=bridge untagged=ether3 vlan-ids=14
add bridge=bridge tagged=bridge untagged=ether2 vlan-ids=4
add bridge=bridge tagged=bridge untagged=sfp1,ether5 vlan-ids=11 comment=vlan11_bridge
/interface list member
add comment=defconf interface=ether1 list=WAN
add interface=vlan_A list=LAN
add interface=wg_s2s list=LAN
add interface=vlan_H list=LAN
add interface=vlanbridge list=LAN
add interface=vlan_E list=LAN
add interface=vlan_A list=MGMT
add interface=wg_s2s list=MGMT
/interface wireguard peers
add allowed-address=10.89.2.0/24,10.89.12.0/24,172.30.12.0/24,10.2.12.0/27 interface=wg_s2s name=aaa
add allowed-address=10.2.12.25/32 comment=S24 interface=wg_s2s name=bbb
add allowed-address=10.2.12.24/32 comment="Laptop" interface=wg_s2s name=ccc
add allowed-address=10.89.3.0/24,10.89.13.0/24,172.30.13.0/24,10.2.12.0/27 interface=wg_s2s name=ddd
/ip address
add address=192.168.48.1/24 comment=defconf interface=vlanbridge network=192.168.48.0
add address=10.89.4.1/24 interface=vlan_A network=10.89.4.0
add address=10.89.14.1/24 interface=vlan_H network=10.89.14.0
add address=172.30.14.1/24 interface=vlan_E network=172.30.14.0
add address=10.2.12.1/27 interface=wg_s2s network=10.2.12.0
/ip cloud
set ddns-enabled=yes
/ip dhcp-client
add interface=ether1
/ip dhcp-server network
add address=10.89.4.0/24 dns-server=10.89.12.30 gateway=10.89.4.1
add address=10.89.14.0/24 dns-server=10.89.12.30 gateway=10.89.14.1
add address=172.30.14.0/24 dns-server=8.8.8.8,1.1.1.1 gateway=172.30.14.1
add address=192.168.48.0/24 comment=defconf dns-server=192.168.48.1 gateway=192.168.48.1
/ip dns
set allow-remote-requests=yes
/ip dns static
add address=192.168.48.1 comment=defconf name=router.lan type=A
/ip firewall address-list
add address=10.89.4.0/24 list=TRUSTED
add address=10.89.14.0/24 list=Local_BV
add address=172.30.14.0/24 list=Local_BV
add address=10.89.2.0/24 list=TRUSTED
add address=10.89.12.0/24 list=WG_H
add address=172.30.12.0/24 list=WG_E
add address=10.89.3.0/24 list=TRUSTED
add address=10.89.13.0/24 list=WG_H
add address=172.30.13.0/24 list=WG_E
add address=192.168.48.0/24 list=DefaultBridge
add address=10.2.12.25 list=TRUSTED
add address=10.2.12.24 list=TRUSTED
/ip 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 ICMP" protocol=icmp
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="FW INPUT LIST -- Allow WG" dst-port=16226 log=yes log-prefix=WG_Input protocol=udp
add action=accept chain=input comment="admin access" in-interface-list=MGMT src-address-list=TRUSTED
add action=accept chain=input comment="users to services" dst-port=53 in-interface-list=LAN protocol=udp
add action=accept chain=input comment="users to services" dst-port=53 in-interface-list=LAN protocol=tcp
add action=drop chain=input comment="drop all else"
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=accept chain=forward comment="FW_FWD_LIST --internet_traffic" in-interface-list=LAN out-interface-list=WAN
add action=accept chain=forward comment="admin access" in-interface-list=MGMT out-interface-list=LAN src-address-list=TRUSTED
add action=accept chain=forward comment="Allow Remote H to Local Subnets" dst-address-list=Local_BV in-interface=wg_s2s src-address-list=WG_H
add action=accept chain=forward comment="allow local H to Local Subnets" dst-address-list=Local_BV src-address=10.89.14.0/24
add action=accept chain=forward comment="allow local H to WG H" dst-address-list=WG_H src-address=10.89.14.0/24
add action=accept chain=forward comment="allow local H to WG E" dst-address-list=WG_E src-address=10.89.14.0/24
add action=accept chain=forward comment="allow local E to WG E ##" dst-address-list=WG_E src-address=172.30.14.0/24
add action=accept chain=forward comment="wireguard relay for remote admin" in-interface=wg_s2s out-interface=wg_s2s
add action=drop chain=forward comment="Drop All Else"
/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade" ipsec-policy=out,none out-interface-list=WAN
/ip route
add comment=WG_A_K disabled=no distance=1 dst-address=10.89.2.0/24 gateway=wg_s2s routing-table=main scope=30 suppress-hw-offload=no target-scope=10
add comment=WG_H_K disabled=no distance=1 dst-address=10.89.12.0/24 gateway=wg_s2s routing-table=main scope=30 suppress-hw-offload=no target-scope=10
add comment=WG_E_K disabled=no distance=1 dst-address=172.30.12.0/24 gateway=wg_s2s routing-table=main scope=30 suppress-hw-offload=no target-scope=10
add comment=WG_A_T disabled=no distance=1 dst-address=10.89.3.0/24 gateway=wg_s2s routing-table=main scope=30 suppress-hw-offload=no target-scope=10
add comment=WG_H_T disabled=no distance=1 dst-address=10.89.13.0/24 gateway=wg_s2s routing-table=main scope=30 suppress-hw-offload=no target-scope=10
add comment=WG_E_T disabled=no distance=1 dst-address=172.30.13.0/24 gateway=wg_s2s routing-table=main scope=30 suppress-hw-offload=no target-scope=10
/ipv6 firewall filter
add action=drop chain=input comment="defconf: drop invalid"
add action=drop chain=forward comment="defconf: drop invalid"
/system clock
set time-zone-name=Asia/Kuala_Lumpur
/system identity
set name=H_Mara
/system logging
add topics=wireguard
/tool mac-server
set allowed-interface-list=none
/tool mac-server mac-winbox
set allowed-interface-list=MGMT