Hey all
As the title suggests, I have WAN working fine on my router, but can’t access any lan devices, have looked through the forums and setup firewall rules which should allow the traffic but doesn’t.
Server is setup to allow 10.6.0.0/24 & 10.20.20.0/24
Peer is setup to allow 0.0.0.0/0
Network setup:
Dual WAN,
1 4G connection with static IP, DMZ’d to the TIK
1 5G connection behind a CGNAT, mainly used for dhcp clients
main route is set out WAN1 (Spark), to allow wireguard to connect properly, everything else is set to 2d(WAN2)
# 2023-08-21 07:50:14 by RouterOS 7.11
# software id = **ELIDED**
#
# model = C53UiG+5HPaxD2HPaxD
# serial number = **ELIDED**
/interface bridge
add name=IoT_Bridge
add name=network_out_bridge
/interface ethernet
set [ find default-name=ether1 ] mtu=1560 name=ether1-WAN-SPARK poe-out=off
set [ find default-name=ether2 ] mtu=1560 name=ether2-WAN-2D
set [ find default-name=ether3 ] name=ether3-network_out
set [ find default-name=ether4 ] name=ether4-network_out
set [ find default-name=ether5 ] name=ether5-network_out
/interface wireguard
add listen-port=51856 mtu=1404 name=wireguard1
/interface list
add name=wan
add name=lan
/interface wifiwave2 security
add authentication-types=wpa2-psk,wpa3-psk disabled=no name=2ghz wps=disable
add authentication-types=wpa2-psk,wpa3-psk disabled=no name=5ghz
add authentication-types=wpa2-psk disabled=no name=IoT
/interface wifiwave2
set [ find default-name=wifi2 ] channel.band=2ghz-n .width=20mhz \
configuration.mode=ap .ssid=$$$$$$$$$$$$$ disabled=no name=AC_2.4 security=\
2ghz
add configuration.hide-ssid=yes .mode=ap .ssid=IoT_SBS disabled=no \
mac-address=AA:BB:CC:DD:EE:FF master-interface=AC_2.4 name=AC_2.4_IoT \
security=IoT
set [ find default-name=wifi1 ] channel.band=5ghz-ax .width=20/40/80mhz \
configuration.mode=ap .ssid=$$$$$$$$$$$$ disabled=no name=AX_5 \
security=5ghz
/ip pool
add name=dhcp_pool1 ranges=10.20.20.68-10.20.20.200
add name=IoT_Pool ranges=10.30.30.20-10.30.30.50
/ip dhcp-server
add address-pool=dhcp_pool1 interface=network_out_bridge lease-time=1d name=\
dhcp1
add address-pool=IoT_Pool interface=IoT_Bridge name=IoT_dhcp
/routing table
add disabled=no fib name=spark
add disabled=no fib name=WireG
add disabled=no fib name=2D
/system logging action
add name=MinervaSyslog remote=10.20.20.10 src-address=10.20.20.1 target=\
remote
/zerotier
set zt1 comment="ZeroTier Central controller - https://my.zerotier.com/" \
interfaces=ether2-WAN-2D name=zt1 port=9993
/zerotier interface
add allow-default=no allow-global=no allow-managed=yes disabled=no instance=\
zt1 name=AtlasV2_Link network=###############
/interface bridge port
add bridge=network_out_bridge ingress-filtering=no interface=\
ether3-network_out
add bridge=network_out_bridge ingress-filtering=no interface=\
ether4-network_out
add bridge=network_out_bridge interface=ether5-network_out
add bridge=IoT_Bridge interface=AC_2.4_IoT
add bridge=network_out_bridge interface=AC_2.4
add bridge=network_out_bridge interface=AX_5
add bridge=network_out_bridge disabled=yes interface=AtlasV2_Link
/ip firewall connection tracking
set tcp-established-timeout=1h
/ip neighbor discovery-settings
set discover-interface-list=!wan
/ip settings
set max-neighbor-entries=8192
/ipv6 settings
set disable-ipv6=yes max-neighbor-entries=8192
/interface list member
add interface=ether1-WAN-SPARK list=wan
add interface=ether2-WAN-2D list=wan
add interface=wireguard1 list=lan
add interface=network_out_bridge list=lan
/interface ovpn-server server
set auth=sha1,md5
/interface wireguard peers
add allowed-address=10.6.0.2/32 interface=wireguard1 public-key=\
"#######################################"
/ip address
add address=10.20.20.1/24 interface=network_out_bridge network=10.20.20.0
add address=192.168.10.10/24 comment=WAN1 interface=ether1-WAN-SPARK network=\
192.168.10.0
add address=192.168.11.10/24 comment=WAN2 interface=ether2-WAN-2D network=\
192.168.11.0
add address=10.30.30.1/24 interface=IoT_Bridge network=10.30.30.0
add address=10.6.0.1/24 interface=wireguard1 network=10.6.0.0
/ip dhcp-client
add disabled=yes interface=ether2-WAN-2D
add disabled=yes interface=ether1-WAN-SPARK
/ip dhcp-server network
add address=10.20.20.0/24 dns-server=10.20.20.6,10.20.20.7 gateway=10.20.20.1
add address=10.30.30.0/24 dns-server=1.1.1.1,1.0.0.1 gateway=10.30.30.1
/ip dns
set allow-remote-requests=yes max-udp-packet-size=512 servers=\
10.20.20.6,10.20.20.7
/ip firewall address-list
add address=10.20.20.0/24 list=trusted_admin
add address=0.0.0.0/8 comment="Self-Identification [RFC 3330]" list=bogons
add address=127.0.0.0/8 comment="Loopback [RFC 3330]" list=bogons
add address=169.254.0.0/16 comment="Link Local [RFC 3330]" list=bogons
add address=172.16.0.0/12 comment="Private[RFC 1918] - CLASS B # Check if you \
need this subnet before enable it" list=bogons
add address=192.0.2.0/24 comment="Reserved - IANA - TestNet1" list=bogons
add address=192.88.99.0/24 comment="6to4 Relay Anycast [RFC 3068]" list=\
bogons
add address=198.18.0.0/15 comment="NIDB Testing" list=bogons
add address=198.51.100.0/24 comment="Reserved - IANA - TestNet2" list=bogons
add address=203.0.113.0/24 comment="Reserved - IANA - TestNet3" list=bogons
add address=224.0.0.0/4 comment=\
"MC, Class D, IANA # Check if you need this subnet before enable it" \
list=bogons
add address=10.30.30.10 comment=Bulb list=Trusted_IoT
add address=10.20.20.200 comment=TurtBook list=my_devices
add address=10.20.20.201 comment=TurtMax list=my_devices
add address=10.20.20.2 comment=SWAG list=spark_wan
add address=10.20.20.9 comment=PLEX list=spark_wan
add address=10.20.20.31 comment=Smokeping-Spark list=spark_wan
/ip firewall filter
add action=accept chain=input comment="Allow ZeroTier" in-interface=\
AtlasV2_Link
add action=accept chain=forward comment="Allow ZeroTier" in-interface=\
AtlasV2_Link
add action=drop chain=input log-prefix=>>INBLOCK>> src-address-list=\
CountryIPBlocks
add action=drop chain=output dst-address-list=CountryIPBlocks log=yes \
log-prefix=>>OUTBLOCK>>
add action=accept chain=input comment="allow WireGuard traffic" src-address=\
10.6.0.0/24
add action=drop chain=output comment="Drop Invalid Out" connection-state=\
invalid
add action=accept chain=input comment=Wireguard dst-port=51856 in-interface=\
ether1-WAN-SPARK log-prefix=WG-IN>> protocol=udp
add action=accept chain=output comment=Wireguard disabled=yes log-prefix=\
WG-OUT>> protocol=udp src-port=51856
add action=accept chain=output comment="Accept Established Out" \
connection-state=established disabled=yes
add action=accept chain=output comment="Accept Related Out" connection-state=\
related disabled=yes
add action=drop chain=forward comment="Drop Invalid Forward" \
connection-state=invalid
add action=drop chain=input comment="Accept ICMP" protocol=icmp \
src-address-list=!trusted_admin
add action=drop chain=input comment="Drop invalid" connection-state=invalid
add action=drop chain=forward comment="Drop invalid" connection-state=invalid
add action=fasttrack-connection chain=forward comment=Fasttrack \
connection-state=established,related hw-offload=yes
add action=accept chain=forward comment="Accept Established Forward" \
connection-state=established log-prefix="Forward "
add action=accept chain=forward comment="Accept Related Forward" \
connection-state=related
add action=accept chain=input comment="Accept SSH from trusted_admin" \
dst-port=22 protocol=tcp src-address-list=trusted_admin
add action=accept chain=input comment="Accept WinBox from trusted_admin" \
dst-port=8298 protocol=tcp src-address-list=trusted_admin
add action=drop chain=input comment="Drop WinBox" dst-port=8298 log=yes \
log-prefix=CPE-DROP-WINBOX protocol=tcp
add action=drop chain=input comment="Drop WinBox" dst-port=8291 log-prefix=\
CPE-DROP-WINBOX protocol=tcp
add action=drop chain=input comment="Drop SNMP" dst-port=161-162 log-prefix=\
CPE-DROP-SNMP protocol=udp
add action=drop chain=input comment="Drop SSH" dst-port=22 log-prefix=\
CPE-DROP-SSH protocol=tcp
add action=drop chain=input comment="Drop TELNET" dst-port=23 log-prefix=\
CPE-DROP-TELNET protocol=tcp
add action=add-src-to-address-list address-list=Syn_Flooder \
address-list-timeout=30m chain=input comment=\
"Add Syn Flood IP to the list" connection-limit=30,32 protocol=tcp \
tcp-flags=syn
add action=drop chain=input comment="Drop to syn flood list" \
src-address-list=Syn_Flooder
add action=add-src-to-address-list address-list=Port_Scanner \
address-list-timeout=1w chain=input comment="Port Scanner Detect" \
protocol=tcp psd=21,3s,3,1
add action=drop chain=input comment="Drop to port scan list" \
src-address-list=Port_Scanner
add action=jump chain=input comment="Jump for icmp input flow" jump-target=\
ICMP protocol=icmp
add action=add-src-to-address-list address-list=spammers \
address-list-timeout=3h chain=forward comment=\
"Add Spammers to the list for 3 hours" connection-limit=30,32 dst-port=\
25,587 limit=30/1m,0 protocol=tcp
add action=drop chain=forward comment="Drop to bogon list" dst-address-list=\
bogons
add action=drop chain=forward comment="Avoid spammers action" dst-port=25,587 \
protocol=tcp src-address-list=spammers
add action=accept chain=input comment="Accept DNS - UDP" port=53 protocol=udp
add action=accept chain=input comment="Accept DNS - TCP" port=53 protocol=tcp
add action=accept chain=input comment="Accept to established connections" \
connection-state=established
add action=accept chain=input comment="Accept to related connections" \
connection-state=related
add action=accept chain=input comment="Allow Plex GDM" in-interface=\
network_out_bridge log-prefix=PlexGDM>> port=32412-32414 protocol=udp \
src-address=10.20.20.9
add action=drop chain=forward comment="Drop non lan forwards" dst-address=\
!10.20.20.0/24 in-interface=network_out_bridge log-prefix=NON_LAN>> \
src-address=!10.20.20.0/24
add action=drop chain=input comment="Drop anything else!" log-prefix=\
DROPALL>>
add action=accept chain=ICMP comment=\
"Echo request - Avoiding Ping Flood, adjust the limit as needed" \
icmp-options=8:0 limit=2,5 protocol=icmp
add action=accept chain=ICMP comment="Echo reply" icmp-options=0:0 protocol=\
icmp
add action=accept chain=ICMP comment="Time Exceeded" icmp-options=11:0 \
protocol=icmp
add action=accept chain=ICMP comment="Destination unreachable" icmp-options=\
3:0-1 protocol=icmp
add action=accept chain=ICMP comment=PMTUD icmp-options=3:4 protocol=icmp
add action=drop chain=ICMP comment="Drop to the other ICMPs" protocol=icmp
add action=jump chain=output comment="Jump for icmp output" jump-target=ICMP \
protocol=icmp
add action=reject chain=forward comment="Drop IoT" log-prefix=IoTDrop>> \
reject-with=icmp-network-unreachable src-address=10.30.30.0/24 \
src-address-list=!Trusted_IoT
add action=accept chain=forward comment="AllowCAM to my_devices" \
dst-address-list=my_devices src-address=10.30.30.5
add action=accept chain=forward comment="AllowCAM to my_devices" \
dst-address=10.30.30.5 src-address-list=my_devices
add action=reject chain=forward comment="Drop IoT" dst-address=10.20.20.0/24 \
log=yes log-prefix=IoT>LAN>> reject-with=icmp-network-unreachable \
src-address=10.30.30.0/24 src-address-list=!Trusted_IoT
add action=reject chain=forward comment="Drop IoT" dst-address=10.30.30.0/24 \
dst-address-list=!Trusted_IoT log=yes log-prefix=LAN>IoT>> reject-with=\
icmp-network-unreachable src-address=10.20.20.0/24
/ip firewall mangle
add action=mark-connection chain=prerouting connection-mark=no-mark \
in-interface=ether1-WAN-SPARK new-connection-mark=spark_conn passthrough=\
yes
add action=mark-connection chain=prerouting connection-mark=no-mark \
in-interface=ether2-WAN-2D new-connection-mark=2d_conn passthrough=yes
add action=mark-routing chain=prerouting comment=spark connection-mark=\
spark_conn in-interface-list=!wan new-routing-mark=spark passthrough=no
add action=mark-routing chain=prerouting comment=2d connection-mark=2d_conn \
in-interface-list=!wan new-routing-mark=2D passthrough=no
add action=mark-connection chain=output comment=2d connection-mark=no-mark \
new-connection-mark=2d_conn out-interface=ether2-WAN-2D passthrough=yes
add action=mark-connection chain=output comment=spark new-connection-mark=\
spark_conn out-interface=ether1-WAN-SPARK passthrough=yes
add action=mark-routing chain=output comment=Spark connection-mark=spark_conn \
new-routing-mark=spark passthrough=no
add action=mark-routing chain=output connection-mark=2d_conn \
new-routing-mark=2D passthrough=no
/ip firewall nat
add action=masquerade chain=srcnat comment="MASQ Spark" out-interface=\
ether1-WAN-SPARK
add action=masquerade chain=srcnat comment="MASQ 2Deg" out-interface=\
ether2-WAN-2D
add action=masquerade chain=srcnat comment="MASQ IoT" out-interface=\
IoT_Bridge
add action=dst-nat chain=dstnat comment=SWAG dst-port=443 in-interface=\
ether1-WAN-SPARK protocol=tcp to-addresses=10.20.20.2 to-ports=443
add action=dst-nat chain=dstnat comment=PLEX dst-port=32504 in-interface=\
ether1-WAN-SPARK protocol=tcp to-addresses=10.20.20.9 to-ports=32400
add action=dst-nat chain=dstnat comment=MINERVA_WG disabled=yes dst-port=\
51856 in-interface=ether1-WAN-SPARK log=yes log-prefix=DST-WG>> protocol=\
udp to-addresses=10.20.20.10 to-ports=51856
/ip route
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=192.168.10.254 \
pref-src="" routing-table=spark scope=30 suppress-hw-offload=no \
target-scope=10
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=192.168.10.254 \
pref-src="" routing-table=main scope=30 suppress-hw-offload=no \
target-scope=10
add disabled=yes distance=1 dst-address=10.253.0.0/24 gateway=10.20.20.10 \
pref-src="" routing-table=main scope=30 suppress-hw-offload=no \
target-scope=10
add disabled=yes distance=1 dst-address=192.168.191.0/24 gateway=AtlasV2_Link \
pref-src="" routing-table=main scope=30 suppress-hw-offload=no \
target-scope=10
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=192.168.11.1 \
pref-src="" routing-table=2D scope=30 suppress-hw-offload=no \
target-scope=10
add disabled=no distance=5 dst-address=0.0.0.0/0 gateway=192.168.11.1 \
routing-table=main scope=30 suppress-hw-offload=no target-scope=10
/ip service
set telnet disabled=yes
set ftp disabled=yes
set www address=10.20.20.0/24 disabled=yes port=82
set ssh address=10.20.20.0/24
set www-ssl address=10.20.20.0/24
set api disabled=yes
set winbox address=10.20.20.0/24 port=8298
set api-ssl disabled=yes
/routing rule
add action=lookup-only-in-table comment=SWAG disabled=no src-address=\
10.20.20.2/32 table=spark
add action=lookup-only-in-table comment=PLEX disabled=no src-address=\
10.20.20.9/32 table=spark
add action=lookup-only-in-table comment=SMOKEPING disabled=no src-address=\
10.20.20.31/32 table=spark
add action=lookup-only-in-table comment=Wireguard disabled=no src-address=\
10.6.0.1/24 table=spark
add action=lookup-only-in-table comment=MACBOOK disabled=yes src-address=\
10.20.20.200/32 table=spark
add action=lookup-only-in-table disabled=yes src-address=10.20.20.200/32 \
table=2D
add action=lookup-only-in-table disabled=no src-address=10.20.20.3/32 table=\
2D
add action=lookup-only-in-table disabled=no src-address=10.20.20.4/30 table=\
2D
add action=lookup-only-in-table disabled=no src-address=10.20.20.8/29 table=\
2D
add action=lookup-only-in-table disabled=no src-address=10.20.20.16/28 table=\
2D
add action=lookup-only-in-table disabled=no src-address=10.20.20.32/27 table=\
2D
add action=lookup-only-in-table disabled=no src-address=10.20.20.64/26 table=\
2D
add action=lookup-only-in-table disabled=no src-address=10.20.20.128/25 \
table=2D
/system clock
set time-zone-name=Pacific/Auckland
/system identity
set name=AtlasV2
/system logging
add action=MinervaSyslog topics=warning
add action=MinervaSyslog topics=critical
add action=MinervaSyslog topics=error
add action=MinervaSyslog topics=interface
add action=MinervaSyslog topics=system
add action=MinervaSyslog topics=firewall
add action=MinervaSyslog topics=wireguard
add action=MinervaSyslog topics=info
add disabled=yes topics=debug
add topics=wireguard
add disabled=yes topics=wireless
/system note
set show-at-login=no
/system ntp client
set enabled=yes
/system ntp client servers
add address=101.100.146.146
add address=202.68.92.244
add address=43.252.70.34
add address=162.159.200.123
/tool bandwidth-server
set enabled=no
Any help is greatly appreciated,
I am aware there are a lot of firewall rules, and can probably be cleaned up a little