Not really.
- The fact is that while I am waiting for an answer, I want to figure it out on my own, the configuration is changing.
- The target result that you would like to get is indicated on the diagram for the post. I will explain
It is required that:
a) all devices connected to the AP (port 7 TL-SG108E) received the subnet address 192.168.154.0/24 and had access to the Internet.
It already works, but I don’t understand how. Devices connected to this network have the right access and address. Although it seems to me that the port tag should be removed when passing through TL-SG108E
b) devices that are connected to TL-SG108E to ports 5-8(TV1 as example, TV2 potencially) also fell into the same VLAN as AP devices, and also had access to the Internet - this does not work now. Devices receive an address from the desired subnet, but do not see either their own gateway, or the custom subnet 192.168.254.0/24 (for example, the DHCP settings specify the gateway 192.168.154.1, but the ping does not reach it after receiving the address. it looks like the subnet is not set correctly, or blocks the Firewall. however, I disabled ALL the deny rules, and it did not help)
c) there are no problems with the client subnet (192.168.254.0/24)
e) TL-SG108E has ip 192.168.154.2
I am publishing the current version of the hap AX3 and TL-SG108E configuration, while I will not make changes, waiting for your advice.
/interface ethernet
set [ find default-name=ether1 ] mtu=1560
set [ find default-name=ether2 ] arp=local-proxy-arp
/interface wifi
set [ find default-name=wifi2 ] channel.band=2ghz-n .skip-dfs-channels=\
disabled .width=20/40mhz configuration.country=Russia .mode=ap .ssid=\
/dev/null .tx-chains="" datapath.bridge=bridge-lan disabled=no mtu=1500 \
security.authentication-types=wpa2-psk,wpa3-psk .disable-pmkid=yes .ft=\
yes .ft-over-ds=yes .group-key-update=1h .management-protection=allowed
/interface pppoe-client
add add-default-route=yes disabled=no interface=ether5 keepalive-timeout=\
disabled max-mtu=1500 name=vrn.tv user=ripab238
/interface vlan
add arp=proxy-arp interface=ether3 name=vlan-iot-interface vlan-id=1100
/interface list
add include=all name=WAN-LIST
add name=LAN-LIST
add name=BRIDGES
/interface wifi channel
add band=5ghz-ax disabled=no name=ch-5 skip-dfs-channels=10min-cac width=\
20/40/80mhz
/interface wifi datapath
add bridge=bridge-lan disabled=no name=zero2brige
/interface wifi security
add authentication-types=wpa2-psk,wpa3-psk disabled=no ft=yes name=\
wifisecprofile
/interface wifi
set [ find default-name=wifi1 ] channel.band=5ghz-ax .frequency=\
5220,5240,5260 .skip-dfs-channels=all .width=20/40/80mhz \
configuration.antenna-gain=6 .chains="" .country=Russia .mode=ap .ssid=\
/dev/zero .tx-chains="" .tx-power=16 disabled=no mtu=1500 name=wifi5 \
security=wifisecprofile
/ip dhcp-server option
add code=42 name="NTP Server" value="'192.168.254.1'"
add code=119 name=Domain_Search_value value="'DUNE.ZONE'"
add code=15 name="Domain_Name value" value="'DUNE.ZONE'"
add code=66 name=pxe value="'192.168.254.5'"
add code=6 name=CloudFireDNS value="'1.1.1.1'"
add code=15 name=IOT_HOME_DOMAIN value="'DUNE-IOT.ZONE'"
/ip dhcp-server option sets
add name=iot options="CloudFireDNS,IOT_HOME_DOMAIN,NTP Server"
/ip pool
add name=dhcp_pool0 ranges=192.168.254.25-192.168.254.229
add name=dhcp2-pool ranges=192.168.154.0/24
add name=dhcp_pool3 ranges=192.168.154.3-192.168.154.254
/ip dhcp-server
add add-arp=yes address-pool=dhcp_pool0 comment="domain=dune.zone" interface=\
bridge-lan lease-script=""
add add-arp=yes address-pool=dhcp_pool3 interface=vlan-iot-interface name=\
dhcp-iot
/ip smb users
set [ find default=yes ] disabled=yes
/ppp profile
set *0 change-tcp-mss=no
/queue simple
add dst=vrn.tv max-limit=400M/400M name=WAN-Limit queue=\
pcq-upload-default/pcq-download-default target=""
/routing table
add fib name=tovpn
/interface bridge port
add bridge=bridge-lan interface=wifi5 point-to-point=no
add bridge=bridge-lan interface=ether2 pvid=1100
add bridge=bridge-lan interface=LAN-LIST internal-path-cost=10 path-cost=10
/ip firewall connection tracking
set udp-timeout=10s
/ip neighbor discovery-settings
set discover-interface-list=LAN-LIST protocol=""
/interface bridge vlan
add bridge=bridge-lan tagged=ether3,bridge-lan vlan-ids=1100
/interface detect-internet
set lan-interface-list=LAN-LIST wan-interface-list=WAN-LIST
/interface list member
add interface=ether3 list=LAN-LIST
add interface=vrn.tv list=WAN-LIST
add interface=bridge-lan list=LAN-LIST
add interface=ether5 list=WAN-LIST
add interface=ether1 list=LAN-LIST
add interface=*F list=BRIDGES
add interface=bridge-lan list=BRIDGES
/ip address
add address=192.168.254.1/24 interface=bridge-lan network=192.168.254.0
add address=192.168.154.1/24 interface=vlan-iot-interface network=\
192.168.154.0
/ip dhcp-client
add disabled=yes interface=ether1 use-peer-dns=no
/ip dhcp-server network
add address=192.168.154.0/24 dns-server=192.168.254.250 gateway=192.168.154.1
add address=192.168.254.0/24 dns-server=192.168.254.250 domain=DUNE.ZONE \
gateway=192.168.254.1 ntp-server=192.168.254.1
/ip firewall filter
add action=log chain=input disabled=yes in-interface=vlan-iot-interface
add action=accept chain=input in-interface=vlan-iot-interface
add action=accept chain=input src-address=192.168.154.0/24
add action=accept chain=forward dst-address=45.90.28.0 log=yes protocol=tcp
add action=drop chain=input comment=Invalid-DROP connection-state=invalid \
log-prefix=Invalid
add action=drop chain=forward comment=\
"Drop packets from LAN that do not have LAN IP" in-interface=bridge-lan \
log=yes log-prefix=LAN_!LAN src-address-list=!LOCAL_LAN
add action=drop chain=forward comment=\
"Drop incoming packets that are not NAT`ted" connection-nat-state=!dstnat \
connection-state=new in-interface=vrn.tv log=yes log-prefix=!NAT
add action=drop chain=forward comment=\
"Drop incoming from internet which is not public IP" in-interface=vrn.tv \
log=yes log-prefix=!public src-address-list=not_in_internet
add action=drop chain=input comment="DNS BLOCK UDP" disabled=yes \
dst-address-list=!DNS_SERVERS dst-port=53,853,5353 log=yes log-prefix=\
"DNS BLOCK TCP" protocol=udp src-address-list=LOCAL_LAN
add action=drop chain=input comment="DNS BLOCK TCP" disabled=yes \
dst-address-list=!DNS_SERVERS dst-port=53,853,5353 log=yes log-prefix=\
"DNS BLOCK TCP" protocol=tcp src-address-list=LOCAL_LAN
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" \
connection-state=established,related hw-offload=yes in-interface-list=\
BRIDGES out-interface-list=WAN-LIST
add action=accept chain=forward dst-address-list=DNS_SERVERS dst-port=\
53,5353,853 log-prefix=aero protocol=tcp src-address-list=LOCAL_LAN
add action=fasttrack-connection chain=forward comment=FASTTRACK_IOT_LAN \
connection-mark=no-mark connection-state=established,related disabled=yes \
hw-offload=yes in-interface-list=WAN-LIST log-prefix=FASTTRACK_IOT_LAN \
out-interface=*F
add action=accept chain=input comment="allow wireguard" dst-port=13256 \
protocol=udp
add action=accept chain=forward comment=ALLOW_LOCAL_LAN_TRAFFIC \
dst-address-list=LOCAL_LAN log-prefix=ALLOW_LOCAL_LAN_TRAFFIC \
src-address-list=LOCAL_LAN
add action=drop chain=output log-prefix=RST protocol=tcp tcp-flags=rst
add action=accept chain=input comment="Accept All DEBUG" disabled=yes \
log-prefix="ALLOW ALL DEBUG"
add action=accept chain=forward comment="Accept All DEBUG" disabled=yes \
log-prefix="ALLOW ALL DEBUG"
add action=accept chain=input dst-address=10.10.10.0/30 log-prefix=CCC!
add action=accept chain=input dst-address=192.168.154.0/24 log-prefix=\
CC23232C!
add action=accept chain=input dst-address=10.100.100.0/24 log-prefix=CCC! \
protocol=udp
add action=accept chain=input comment="DISABLE 14/02" in-interface=\
wireguard-alpina log=yes log-prefix=alpina
add action=accept chain=input comment="DISABLE 14/02" in-interface=\
wireguard2ccc log=yes log-prefix=alpina
add action=drop chain=input dst-port=53 in-interface-list=WAN-LIST log=yes \
log-prefix=DROP_DNS_WEB protocol=udp src-address-list=!LOCAL_LAN
add action=reject chain=forward disabled=yes in-interface=bridge-lan log=yes \
log-prefix=DROP_NOT_INCOMING_FROM_LAN reject-with=\
icmp-network-unreachable src-address-list=!LAN+WIFI
add action=accept chain=input connection-state=established,related,untracked \
in-interface-list=WAN-LIST
add action=accept chain=forward comment=\
"1.1. Forward and Input Established and Related connections" \
connection-state=established,related,untracked in-interface-list=WAN-LIST
add action=accept chain=input comment=BGP log=yes log-prefix=BGP protocol=tcp \
src-address=51.75.66.20
add action=accept chain=input comment="Allow IGMP" in-interface-list=WAN-LIST \
protocol=igmp
add action=accept chain=input comment="Allow LAN Traffic" in-interface-list=\
LAN-LIST
add action=accept chain=input dst-port=53 in-interface-list=LAN-LIST \
protocol=udp
add action=accept chain=input comment=\
"Allow Discover in LAN,DISABLE 14/02 zero trafic" disabled=yes \
in-interface-list=LAN-LIST port=5678 protocol=udp
add action=accept chain=input comment="Allow SNMP" dst-port=161 \
in-interface-list=WAN-LIST log-prefix=SNMPF protocol=udp
add action=accept chain=input comment=IOT-TUYA-Broadcast dst-address=\
255.255.255.255 dst-port=6667 log-prefix=IOT-TUYA protocol=udp \
src-address-list=IOT-LAN
add action=drop chain=input comment="DROP Mikrotik Discovery" log-prefix=\
"DROP Mikrotik Discovery" protocol=udp src-address-list=!LOCAL_LAN \
src-port=5678
add action=accept chain=input comment="Allow API" dst-port=8728 \
in-interface-list=WAN-LIST log-prefix="API Prometheus" protocol=tcp \
src-address=178.20.41.20
add action=accept chain=forward comment=WG dst-port=13256 in-interface-list=\
WAN-LIST log-prefix=WG protocol=udp src-address=0.0.0.0
add action=accept chain=input comment="Access Normal Ping" in-interface-list=\
WAN-LIST limit=50/5s,2:packet protocol=icmp
add action=add-src-to-address-list address-list="Hacker Scanners" \
address-list-timeout=4w2d chain=input comment="Port Scanners" \
in-interface-list=WAN-LIST protocol=tcp psd=21,3s,3,1
add action=add-src-to-address-list address-list="Hacker Scanners" \
address-list-timeout=4w2d chain=input comment="NMAP FIN Stealth scan" \
in-interface-list=WAN-LIST protocol=tcp tcp-flags=\
fin,!syn,!rst,!psh,!ack,!urg
add action=add-src-to-address-list address-list="Hacker Scanners" \
address-list-timeout=4w2d chain=input comment="SYN/FIN scan" \
in-interface-list=WAN-LIST protocol=tcp tcp-flags=fin,syn
add action=add-src-to-address-list address-list="Hacker Scanners" \
address-list-timeout=4w2d chain=input comment="SYN/RST scan" \
in-interface-list=WAN-LIST protocol=tcp tcp-flags=syn,rst
add action=add-src-to-address-list address-list="Hacker Scanners" \
address-list-timeout=4w2d chain=input comment="FIN/PSH/URG scan" \
in-interface-list=WAN-LIST protocol=tcp tcp-flags=\
fin,psh,urg,!syn,!rst,!ack
add action=add-src-to-address-list address-list="Hacker Scanners" \
address-list-timeout=4w2d chain=input comment="ALL/ALL scan" \
in-interface-list=WAN-LIST protocol=tcp tcp-flags=fin,syn,rst,psh,ack,urg
add action=add-src-to-address-list address-list="Hacker Scanners" \
address-list-timeout=4w2d chain=input comment="NMAP NULL scan" \
in-interface-list=WAN-LIST protocol=tcp tcp-flags=\
!fin,!syn,!rst,!psh,!ack,!urg
add action=add-src-to-address-list address-list="Honeypot Hacker" \
address-list-timeout=4w2d chain=input comment=\
"block honeypot ssh rdp winbox" connection-state=new dst-port=\
22,3389,8291,25,21,8728 in-interface-list=WAN-LIST protocol=tcp
add action=drop chain=input comment="drop 8.217.255.5" src-address=\
8.217.255.5
add action=drop chain=forward comment="drop 8.217.255.5" src-address=\
8.217.255.5
add action=accept chain=input in-interface=!bridge-lan log-prefix=ddd1 \
protocol=udp src-port=68
add action=drop chain=input comment="Drop All Other" disabled=yes \
in-interface-list=WAN-LIST log-prefix=DEF_DROP
add action=log chain=output disabled=yes log=yes
/ip firewall mangle
add action=change-mss chain=forward new-mss=clamp-to-pmtu passthrough=yes \
protocol=tcp tcp-flags=syn
add action=change-mss chain=forward disabled=yes log=yes log-prefix=\
CHANGE-MSS-OUT new-mss=clamp-to-pmtu out-interface-list=WAN-LIST \
passthrough=yes protocol=tcp tcp-flags=syn tcp-mss=1300-65535
add action=change-mss chain=forward new-mss=1420 out-interface-list=WAN-LIST \
passthrough=yes protocol=tcp tcp-flags=syn tcp-mss=1421-65535
add action=change-mss chain=forward in-interface-list=WAN-LIST log-prefix=\
CHANGE-MSS-OUT new-mss=clamp-to-pmtu passthrough=no protocol=tcp \
tcp-flags=syn tcp-mss=1300-65535
add action=mark-connection chain=prerouting comment=DNS-Mark \
connection-state=new disabled=yes dst-port=53,853,5353 \
new-connection-mark=via-dns passthrough=yes protocol=tcp src-address=\
192.168.254.0/24
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
dst-port=53,853,5353 new-connection-mark=via-dns passthrough=yes \
protocol=udp src-address=192.168.254.0/24
add action=change-mss chain=forward disabled=yes new-mss=1400 out-interface=\
WB passthrough=yes protocol=tcp tcp-flags=syn
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
dst-address-list=WB in-interface=bridge-lan new-connection-mark=to_WB \
passthrough=yes
add action=mark-routing chain=prerouting connection-mark=to_WB disabled=yes \
new-routing-mark=toWB passthrough=yes
/ip firewall nat
add action=src-nat chain=srcnat comment="TELEKOM-SERVICE MAIN_SRC_NAT" \
log-prefix="MAIN SRC NAT" out-interface=vrn.tv src-address-list=LOCAL_LAN \
to-addresses=185.23.83.133
add action=dst-nat chain=dstnat comment="DNS forward UDP" disabled=yes \
dst-port=53,853,5353 log-prefix="DNS forward UDP" protocol=udp \
src-address=192.168.154.0/24 to-addresses=192.168.254.250
add action=dst-nat chain=dstnat comment=piholeNAT1 disabled=yes dst-port=\
53,853,5353 log-prefix="DNS forward" protocol=udp src-address=\
192.168.154.0/24 to-addresses=192.168.254.250
add action=dst-nat chain=dstnat comment=piholeNAT1 disabled=yes dst-port=\
53,853,5353 log-prefix="DNS forward" protocol=tcp src-address=\
192.168.154.0/24 to-addresses=192.168.254.250
add action=masquerade chain=srcnat comment=test disabled=yes log=yes \
log-prefix=LOCAL_2_IOT_ACCESS out-interface=vlan-iot-interface
add action=masquerade chain=srcnat comment=LOCAL_2_IOT_ACCESS dst-address=\
192.168.154.0/24 log-prefix=LOCAL_2_IOT_ACCESS out-interface=\
vlan-iot-interface src-address=192.168.254.250
add action=masquerade chain=srcnat comment=LOCAL_2_IOT_ACCESS dst-address=\
192.168.154.0/24 log-prefix=LOCAL_2_IOT_ACCESS out-interface=\
vlan-iot-interface src-address=192.168.254.0/24
add action=masquerade chain=srcnat disabled=yes dst-address=192.168.154.8 \
log=yes log-prefix=!!!!192.168.154.8 out-interface=*F src-address=\
192.168.254.250
add action=masquerade chain=srcnat comment=TELEKOM-SERVICE-IOT disabled=yes \
dst-address=!192.168.154.0/24 log-prefix=IOT out-interface=vrn.tv \
src-address=192.168.154.0/24 to-addresses=185.23.83.133
add action=dst-nat chain=dstnat comment="Forward All TCP DNS to Pi" disabled=\
yes dst-address-list=!DNS_SERVERS dst-port=53,853,5353 log-prefix=\
ForwardTCP_DNS protocol=tcp src-address-list=LOCAL_LAN to-addresses=\
192.168.254.250
add action=dst-nat chain=dstnat comment="Forward All UDP DNS to Pi" disabled=\
yes dst-address-list=!DNS_SERVERS dst-port=53,853,5353 log-prefix=\
ForwardUDP_DNS protocol=udp src-address-list=LOCAL_LAN to-addresses=\
192.168.254.250
add action=masquerade chain=srcnat comment=WG_VPN_NAT log-prefix=WG_VPN_NAT \
out-interface=wireguard3 src-address=192.168.254.0/24
add action=masquerade chain=srcnat comment=WG_CCC_NAT log-prefix=WG_CCC_NAT \
out-interface=wireguard2ccc src-address=192.168.254.0/24
add action=masquerade chain=srcnat comment=WG_WB_NAT log-prefix=WG_WB_NAT \
out-interface=WB src-address-list=2-WB
add action=masquerade chain=srcnat comment=WG_VPN_ALPINA log-prefix=\
WG_VPN_ALPINA out-interface=wireguard-alpina src-address=192.168.254.0/24
add action=masquerade chain=srcnat comment="MASQL CCC TO_DELETE" disabled=yes \
dst-address=10.10.10.0/23 dst-address-list="" log=yes log-prefix=1
add action=src-nat chain=srcnat comment=TO_DELETE disabled=yes src-address=\
10.2.0.2 to-addresses=192.168.254.1
add action=dst-nat chain=dstnat comment="PROMETHEUS DST_NAT" dst-address=\
185.23.83.133 dst-port=9221 log-prefix="PROMETHEUS DST_NAT" protocol=tcp \
to-addresses=192.168.254.250 to-ports=9100
add action=dst-nat chain=dstnat comment=----------- dst-address=185.23.83.133 \
dst-port=14620 protocol=tcp to-addresses=192.168.254.23 to-ports=14620
add action=dst-nat chain=dstnat comment=PROMETHEUS_ADGUARD_EXPORTER \
dst-address=185.23.83.133 dst-port=9617 log-prefix=\
PROMETHEUS_ADGUARD_EXPORTER protocol=tcp to-addresses=192.168.254.250 \
to-ports=9617
add action=dst-nat chain=dstnat comment=PROMETHEUS_BLACK_BOX dst-address=\
185.23.83.133 dst-port=9515 log-prefix=PROMETHEUS_BLACK_BOX protocol=tcp \
to-addresses=192.168.254.23 to-ports=9115
add action=dst-nat chain=dstnat comment=TO_DELETE dst-address=185.23.83.133 \
dst-port=3344 protocol=tcp to-addresses=192.168.254.23 to-ports=443
add action=dst-nat chain=dstnat comment=TO_DELETE disabled=yes dst-address=\
185.23.83.133 dst-port=53,853,5353 log-prefix=vps protocol=udp \
src-address=95.142.47.131 to-addresses=192.168.254.250 to-ports=53
add action=dst-nat chain=dstnat comment="ZABBIX PC" dst-address=185.23.83.133 \
dst-port=12350 log-prefix=zabbix-ps protocol=tcp src-address=178.20.41.20 \
to-addresses=192.168.254.38 to-ports=10050
add action=dst-nat chain=dstnat comment=DNS_REDIRECT disabled=yes dst-port=\
5353 protocol=tcp to-addresses=192.168.254.250 to-ports=5353
add action=dst-nat chain=dstnat comment=PROMETHEUS_ADGUARD_EXPORTER \
dst-address=185.23.83.133 dst-port=8334 log-prefix=mtproto protocol=tcp \
to-addresses=192.168.254.250 to-ports=8224
/ip firewall raw
add action=drop chain=prerouting in-interface=vrn.tv src-address-list=\
"Honeypot Hacker"
add action=drop chain=prerouting in-interface=vrn.tv src-address-list=\
"Hacker Scanners"
add action=drop chain=prerouting dst-port=137,138,139 in-interface-list=\
WAN-LIST protocol=udp
add action=drop chain=prerouting dst-address-list=ddos-target \
src-address-list=ddos-attackers
add action=drop chain=prerouting dst-port=137,138,139 in-interface-list=\
WAN-LIST protocol=udp
add action=drop chain=prerouting comment=\
"TCP invalid combination of flags attack (7 rules)" protocol=tcp \
tcp-flags=!fin,!syn,!rst,!ack
add action=drop chain=prerouting protocol=tcp tcp-flags=fin,syn
add action=drop chain=prerouting protocol=tcp tcp-flags=fin,rst
add action=drop chain=prerouting protocol=tcp tcp-flags=fin,!ack
add action=drop chain=prerouting protocol=tcp tcp-flags=fin,urg
add action=drop chain=prerouting protocol=tcp tcp-flags=syn,rst
add action=drop chain=prerouting protocol=tcp tcp-flags=rst,urg
add action=drop chain=prerouting comment="TCP Port 0 attack (2 rules)" \
protocol=tcp src-port=0
add action=drop chain=prerouting dst-port=0 protocol=tcp
add action=drop chain=prerouting comment="UDP Port 0 attack (2 rules)" \
protocol=udp src-port=0
add action=drop chain=prerouting dst-port=0 protocol=udp
add action=drop chain=prerouting comment="IP option loose-source-routing" \
ipv4-options=loose-source-routing
add action=drop chain=prerouting comment="IP option strict-source-routing" \
ipv4-options=strict-source-routing
add action=drop chain=prerouting comment="IP option loose-source-routing" \
ipv4-options=loose-source-routing
add action=drop chain=prerouting comment="IP option strict-source-routing" \
ipv4-options=strict-source-routing
add action=drop chain=prerouting comment="IP option record-route" \
ipv4-options=record-route
add action=drop chain=prerouting comment="IP option router-alert" \
ipv4-options=router-alert
add action=drop chain=prerouting comment="IP option timestamp" ipv4-options=\
timestamp
add action=drop chain=prerouting comment=\
"IP options left, except IP Stream used by the IGMP protocol" \
ipv4-options=any protocol=!igmp
add action=drop chain=prerouting comment="IP option loose-source-routing" \
ipv4-options=loose-source-routing
add action=drop chain=prerouting comment="IP option strict-source-routing" \
ipv4-options=strict-source-routing
add action=drop chain=prerouting comment="IP option record-route" \
ipv4-options=record-route
add action=drop chain=prerouting comment="IP option router-alert" \
ipv4-options=router-alert
add action=drop chain=prerouting comment="IP option timestamp" ipv4-options=\
timestamp
add action=drop chain=prerouting comment=\
"IP options left, except IP Stream used by the IGMP protocol" \
ipv4-options=any protocol=!igmp
/ip firewall service-port
set ftp disabled=yes
/ip route
add blackhole dst-address=172.16.0.0/12
add blackhole dst-address=192.168.0.0/16
add disabled=no distance=1 dst-address=45.90.28.199/32 gateway=vrn.tv \
pref-src="" routing-table=main scope=30 suppress-hw-offload=no \
target-scope=10


