I dusted off an rb4011 after a while and have custom configured it; still on routerOS v.6.49.19 LTS.
The below is how the current configuration looks like (stubbed) and it is restrictive just the way needed. The
But I am looking as to how can:
1. a macOS machine (in vlan-id=11) continue to do it's time machine backups on a NAS in another vlan (vlan-id=14). the mac refuses to detect the time machine backup folder/drive. (basically nas.local doesn't work, nas.lan does resolve but backup folder is unreachable by time machine (manual smb browsing works fine); even though DNS server already resolves both nas.lan & nas.local to the correct IP)
2. and have a chromecast connect to a mobile device within a vlan (vlan-id=12).
It turns out to be mDNS traffic destined for port 5353 and I could see packets going around for port 5353 from both sides/devices in either cases above. Did play around with some* firewall rules allowing traffic for port 5353 in LAN interface but no bueno.
I would prefer to avoid:
a. keep WLAN / wifi settings as-is as much as possible
b. spinning up a docker container just for this
c. and to keep firewall / packet filtering restrictive as-is as much possible, only to allow needed traffic to get the job done. Also, upgrading to v.7.xx is not in the workx at the moment, unfortunately.
I did see an old thread https://forum.mikrotik.com/t/mdns-between-vlans-with-just-bridge-filters-look-mum-no-containers/ but still wanted to start afresh as it already predates v.6.49.19 LTS release.
I do not have extensive experience with routerOS, and so here I am seeking solid help (appreciated!).
# by RouterOS 6.49.19
/interface bridge
add admin-mac=ADMIN_MAC_ADDRESS auto-mac=no name=bridge vlan-filtering=yes
/interface wireless
set [ find default-name=wlan1 ] band=5ghz-a/n/ac channel-width=\
20/40/80mhz-XXXX country=no_country_set disabled=no distance=indoors \
frequency=auto installation=indoor mode=ap-bridge skip-dfs-channels=all \
ssid=ssid1 wireless-protocol=802.11 wmm-support=enabled wps-mode=\
disabled
set [ find default-name=wlan2 ] band=2ghz-b/g/n channel-width=20/40mhz-XX \
country=no_country_set disabled=no distance=indoors frequency=auto \
installation=indoor mode=ap-bridge skip-dfs-channels=all ssid=ssid1 \
wireless-protocol=802.11 wps-mode=disabled
/interface vlan
add arp=reply-only interface=bridge name=vlan_1 vlan-id=11
add arp=reply-only interface=bridge name=vlan_2 vlan-id=12
add arp=reply-only interface=bridge name=vlan_3_docker vlan-id=13
add arp=reply-only interface=bridge name=vlan_4_nas vlan-id=14
add arp=reply-only interface=bridge name=vlan_5 vlan-id=15
/interface ethernet switch port
set 0 default-vlan-id=0
set 1 default-vlan-id=0
set 2 default-vlan-id=0
set 3 default-vlan-id=0
set 4 default-vlan-id=0
set 5 default-vlan-id=0
set 6 default-vlan-id=0
set 7 default-vlan-id=0
set 8 default-vlan-id=0
set 9 default-vlan-id=0
set 10 default-vlan-id=0
set 11 default-vlan-id=0
/interface list
add name=WAN
add name=LAN
add name=MGMT
/interface wireless security-profiles
set [ find default=yes ] authentication-types=wpa2-psk disable-pmkid=yes \
management-protection=allowed mode=dynamic-keys supplicant-identity=\
MikroTik wpa2-pre-shared-key=\
pwd1
add authentication-types=wpa2-psk disable-pmkid=yes management-protection=\
allowed mode=dynamic-keys name=guest-profile supplicant-identity=MikroTik \
wpa2-pre-shared-key=pwd2
/interface wireless
add default-forwarding=no disabled=no keepalive-frames=disabled mac-address=\
MAC_ADDRESS_WLAN1 master-interface=wlan1 multicast-buffering=disabled \
name=wlan1-guest security-profile=guest-profile ssid=ssid2 \
wps-mode=disabled
add default-forwarding=no disabled=no keepalive-frames=disabled mac-address=\
MAC_ADDRESS_WLAN2 master-interface=wlan2 multicast-buffering=disabled \
name=wlan2-guest security-profile=guest-profile ssid=ssid2 \
wps-mode=disabled
/ip dhcp-server
add add-arp=yes disabled=no interface=vlan_1 lease-time=1d name=dhcp_vlan1
add add-arp=yes disabled=no interface=vlan_2 lease-time=1d name=dhcp_vlan2
add add-arp=yes disabled=no interface=vlan_3_docker lease-time=1d name=\
dhcp_vlan3_docker
add add-arp=yes disabled=no interface=vlan_4_nas lease-time=1d name=\
dhcp_vlan4_nas
/ip pool
add name=pool_vlan5 ranges=10.1.15.10-10.1.15.254
/ip dhcp-server
add add-arp=yes address-pool=pool_vlan5 disabled=no interface=vlan_5 \
lease-time=1d name=dhcp_vlan5
/interface bridge port
add bridge=bridge interface=ether8 pvid=11
add bridge=bridge interface=wlan1 pvid=15
add bridge=bridge interface=wlan2 pvid=15
add bridge=bridge interface=wlan1-guest pvid=15
add bridge=bridge interface=wlan2-guest pvid=15
add bridge=bridge comment="unused ether2" interface=ether2 pvid=15
add bridge=bridge comment="unused ether4" interface=ether4 pvid=15
add bridge=bridge comment="unused ether5" interface=ether5 pvid=15
add bridge=bridge comment="unused ether7" interface=ether7 pvid=15
add bridge=bridge comment=bridge_vlan_3_docker interface=ether3 pvid=13
add bridge=bridge comment=bridge_vlan_4_nas interface=ether6 pvid=14
add bridge=bridge comment=bridge_vlan_4_nas_2 interface=ether9 pvid=14
/ip neighbor discovery-settings
set discover-interface-list=MGMT
/interface bridge vlan
add bridge=bridge tagged=bridge,wlan1,wlan2 untagged=ether8 vlan-ids=11
add bridge=bridge tagged=bridge,wlan1,wlan2 vlan-ids=12
add bridge=bridge tagged=bridge,wlan1,wlan2 untagged=ether3 vlan-ids=13
add bridge=bridge tagged=bridge,wlan1,wlan2 untagged=ether6,ether9 vlan-ids=\
14
add bridge=bridge tagged=bridge untagged=\
wlan1,wlan2,wlan1-guest,wlan2-guest,ether2,ether4,ether5,ether7 vlan-ids=\
15
/interface list member
add interface=ether1 list=WAN
add interface=vlan_1 list=LAN
add interface=vlan_1 list=MGMT
add interface=vlan_2 list=LAN
add interface=vlan_3_docker list=LAN
add interface=vlan_4_nas list=LAN
add interface=vlan_5 list=LAN
add interface=ether8 list=MGMT
/interface wireless access-list
add forwarding=no mac-address=MAC_ADDRESS_1 vlan-id=11 vlan-mode=use-tag
add forwarding=no mac-address=MAC_ADDRESS_2 vlan-id=11 vlan-mode=use-tag
add forwarding=no mac-address=MAC_ADDRESS_3 vlan-id=11 vlan-mode=use-tag
add mac-address=MAC_ADDRESS_4 vlan-id=12 vlan-mode=use-tag
add mac-address=MAC_ADDRESS_5 vlan-id=12 vlan-mode=use-tag
/ip address
add address=10.1.11.1/24 interface=vlan_1 network=10.1.11.0
add address=10.1.12.1/24 interface=vlan_2 network=10.1.12.0
add address=10.1.13.1/24 interface=vlan_3_docker network=10.1.13.0
add address=10.1.14.1/24 interface=vlan_4_nas network=10.1.14.0
add address=10.1.15.1/24 interface=vlan_5 network=10.1.15.0
/ip dhcp-client
add disabled=no interface=ether1 use-peer-dns=no
/ip dhcp-server lease
add address=10.1.11.11 mac-address=MAC_ADDRESS_1 server=dhcp_vlan1
add address=10.1.13.13 mac-address=MAC_ADDRESS_6 server=dhcp_vlan3_docker
add address=10.1.14.14 mac-address=MAC_ADDRESS_7 server=dhcp_vlan4_nas
add address=10.1.14.24 mac-address=MAC_ADDRESS_8 server=dhcp_vlan4_nas
add address=10.1.11.20 mac-address=MAC_ADDRESS_2 server=dhcp_vlan1
add address=10.1.11.21 mac-address=MAC_ADDRESS_3 server=dhcp_vlan1
add address=10.1.12.20 mac-address=MAC_ADDRESS_4 server=dhcp_vlan2
add address=10.1.12.22 mac-address=MAC_ADDRESS_5 server=dhcp_vlan2
/ip dhcp-server network
add address=10.1.11.0/24 dns-server=10.1.13.13 gateway=10.1.11.1
add address=10.1.12.0/24 dns-server=10.1.13.13 gateway=10.1.12.1
add address=10.1.13.0/24 dns-server=10.1.13.1 gateway=10.1.13.1
add address=10.1.14.0/24 dns-server=10.1.13.13 gateway=10.1.14.1
add address=10.1.15.0/24 dns-server=10.1.13.13 gateway=10.1.15.1
/ip dns
set servers=1.1.1.1
/ip firewall filter
add action=drop chain=input comment="defconf: drop invalid" connection-state=\
invalid
add action=accept chain=input comment=\
"ACCEPT: Established, Related, Untracked" connection-state=\
established,related,untracked
add action=drop chain=input comment="DROP: ALL INBOUND WAN INSTANTLY" \
in-interface-list=WAN
add action=accept chain=input comment="ACCEPT: DHCP Requests from LAN" \
dst-port=67 in-interface-list=LAN protocol=udp
add action=accept chain=input comment="ACCEPT: ICMP (Ping) from LAN only" \
in-interface-list=LAN limit=50/5s,2:packet protocol=icmp
add action=accept chain=input comment=\
"ACCEPT: Strict Management (VLAN 1 only)" dst-address=10.1.11.1 dst-port=\
22,80,443,8291 in-interface=vlan_1 protocol=tcp src-address=10.1.11.11
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
add action=drop chain=input in-interface-list=WAN src-address=10.0.0.0/8
add action=drop chain=input in-interface-list=WAN src-address=172.16.0.0/12
add action=drop chain=input in-interface-list=WAN src-address=192.168.0.0/16
add action=drop chain=input comment="DROP: All other Input (Catch-All)"
add action=fasttrack-connection chain=forward comment="FASTTRACK: Est/Rel" \
connection-state=established,related
add action=accept chain=forward comment=\
"ACCEPT: Established, Related, Untracked" connection-state=\
established,related,untracked
add action=accept chain=forward comment=\
"ACCEPT: All VLANs -> VLAN 3 DNS Server" dst-address=10.1.13.13 dst-port=\
53 protocol=udp
add action=accept chain=forward comment=\
"ACCEPT: All VLANs -> VLAN 3 DNS Server" dst-address=10.1.13.13 dst-port=\
53 protocol=tcp
add action=drop chain=forward comment="DROP: Rogue DNS queries (UDP)" \
disabled=yes dst-address=!10.1.13.13 dst-port=53 protocol=udp \
src-address=!10.1.13.13
add action=drop chain=forward comment="DROP: Rogue DNS queries (TCP)" \
disabled=yes dst-address=!10.1.13.13 dst-port=53 protocol=tcp \
src-address=!10.1.13.13
add action=accept chain=forward comment=\
"ACCEPT: VLAN 1 -> VLAN 3 (DNS/Docker)" in-interface=vlan_1 \
out-interface=vlan_3_docker
add action=accept chain=forward comment="ACCEPT: VLAN 1 -> VLAN 4 (NAS)" \
in-interface=vlan_1 out-interface=vlan_4_nas
add action=accept chain=forward comment=\
"ACCEPT: VLAN 1 -> VLAN 1 (Intra-VLAN)" in-interface=vlan_1 \
out-interface=vlan_1
add action=accept chain=forward comment=\
"ACCEPT: VLAN 2 -> VLAN 2 (Intra-VLAN)" in-interface=vlan_2 \
out-interface=vlan_2
add action=drop chain=forward comment="DROP: VLAN 5 -> VLAN 5 (L3 Isolation)" \
in-interface=vlan_5 out-interface=vlan_5
add action=accept chain=forward comment="ACCEPT: VLANs -> WAN" \
in-interface-list=LAN out-interface-list=WAN
add action=drop chain=forward in-interface-list=WAN src-address=10.0.0.0/8
add action=drop chain=forward in-interface-list=WAN src-address=172.16.0.0/12
add action=drop chain=forward in-interface-list=WAN src-address=\
192.168.0.0/16
add action=drop chain=forward comment="DROP: Default Deny All Forwarding"
/ip firewall nat
add action=masquerade chain=srcnat comment="NAT: Masquerade LAN to WAN" \
out-interface-list=WAN
add action=dst-nat chain=dstnat dst-address=!10.1.13.13 dst-port=53 \
in-interface-list=LAN protocol=udp src-address=!10.1.13.13 to-addresses=\
10.1.13.13
add action=dst-nat chain=dstnat dst-address=!10.1.13.13 dst-port=53 \
in-interface-list=LAN protocol=tcp src-address=!10.1.13.13 to-addresses=\
10.1.13.13
/ip service
set telnet disabled=yes
set ftp disabled=yes
set www disabled=yes
set ssh address=10.1.11.11/32
set api disabled=yes
set winbox address=10.1.11.11/32
set api-ssl disabled=yes
/system clock
set time-zone-name=America/NY
/system leds
add interface=wlan2 leds="wlan2_signal1-led,wlan2_signal2-led,wlan2_signal3-le\
d,wlan2_signal4-led,wlan2_signal5-led" type=wireless-signal-strength
add interface=wlan2 leds=wlan2_tx-led type=interface-transmit
add interface=wlan2 leds=wlan2_rx-led type=interface-receive
/tool mac-server
set allowed-interface-list=MGMT
/tool mac-server mac-winbox
set allowed-interface-list=MGMT
/tool mac-server ping
set enabled=no
Layout:
Basically, everything falls to vlan_5 (vlan-id=15) if not assigned/IP/ MAC address bounded.