I have a slight issue with a Brother printer which is located on a different VLAN than the devices from which I intend to print from. My setup is quite simple:
- VLAN ID10: Home devices
- VLAN ID20: Work devices
- VLAN ID30: IOT devices and Brother printer
The entire VLAN setup works apart of that I am unable to print from the devices located on VLAN ID10. I therefore made the printer IP static and added the following firewall rule:
Code: Select all
add action=accept chain=forward comment=\
"Access Printer on Printing Network from Home Network" dst-address=\
192.168.30.8 in-interface=VLAN-Home out-interface=VLAN-Printer-IOT
This firewall rule allows me to ping the printer from the devices located on VLAN ID10. However I am still unable to print. I tried to add the printer via the dedicated IP directly in windows ("add a printer or a scanner") and also via the Brother software (the software can initially locate the printer, but is also unable to add it). Does anyone have an idea what I am doing wrong?
The firewall goal is:
1. As strict as possible firewall rules
2. VLANs shall not communicate with eachother (exception: VLAN ID10 devices shall be able to send data to the printer located on VLAN ID30 for printing purposes, but not the other way around)
My entire config is as follows:
Code: Select all
# 2025-01-08 19:28:18 by RouterOS 7.16.2
# software id = KSYB-YVIV
#
# model = C53UiG+5HPaxD2HPaxD
/interface bridge
add name=Bridge-LAN vlan-filtering=yes
/interface ethernet
set [ find default-name=ether1 ] name=ether1-WAN
set [ find default-name=ether2 ] disabled=yes name=ether2-LAN
set [ find default-name=ether3 ] disabled=yes name=ether3-LAN
set [ find default-name=ether4 ] disabled=yes name=ether4-LAN
set [ find default-name=ether5 ] disabled=yes name=ether5-LAN
/interface vlan
add interface=Bridge-LAN name=VLAN-Home vlan-id=10
add interface=Bridge-LAN name=VLAN-Work vlan-id=20
add interface=Bridge-LAN name=VLAN-Printer-IOT vlan-id=30
/interface list
add name=WAN
add name=VLAN
add name=VLAN-Admin
/interface wifi configuration
add channel.band=2ghz-ax .width=20mhz country=Germany disabled=no mode=ap \
name="2.4ghz Config" security.authentication-types=wpa3-psk \
.disable-pmkid=yes .encryption=ccmp,gcmp .wps=disable ssid=TestNet tx-power=\
10
add channel.band=5ghz-ax .width=20/40mhz country=Germany disabled=no mode=\
ap name="5ghz Config" security.authentication-types=wpa3-psk \
.disable-pmkid=yes .encryption=ccmp,gcmp,ccmp-256,gcmp-256 .wps=disable \
ssid=TestNet5G tx-power=18
add channel.band=2ghz-ax .width=20mhz country=Germany disabled=no mode=ap \
name="2.4ghz Config-Work" security.authentication-types=wpa3-psk \
.disable-pmkid=yes .encryption=ccmp,gcmp,ccmp-256,gcmp-256 .wps=disable \
ssid=TestNet-Work tx-power=10
add channel.band=2ghz-n .width=20mhz country=Germany disabled=no mode=ap \
name="2.4ghz Config-Printer-IOT" security.authentication-types=wpa2-psk \
.disable-pmkid=yes .encryption=ccmp .wps=disable ssid=TestNet-Printer tx-power=10
/interface wifi
set [ find default-name=wifi1 ] configuration="5ghz Config" \
configuration.mode=ap name=Wifi1-5ghz
set [ find default-name=wifi2 ] configuration="2.4ghz Config" \
configuration.mode=ap disabled=no name=Wifi2-2.4ghz
add configuration="2.4ghz Config-Printer-IOT" configuration.mode=ap disabled=\
no mac-address=XX:XX:XX:XX:XX:XX master-interface=Wifi2-2.4ghz name=\
Wifi2-2.4ghz-Printer-IOT
add configuration="2.4ghz Config-Work" configuration.mode=ap disabled=no \
mac-address=XX:XX:XX:XX:XX:XX master-interface=Wifi2-2.4ghz name=\
Wifi2-2.4ghz-Work
/ip pool
add name=VLAN-Home-Pool ranges=192.168.10.20-192.168.10.254
add name=VLAN-Work-Pool ranges=192.168.20.20-192.168.20.254
add name=VLAN-Printer-IOT-Pool ranges=192.168.30.20-192.168.30.254
/ip dhcp-server
add address-pool=VLAN-Home-Pool interface=VLAN-Home name=VLAN-Home-DHCP
add address-pool=VLAN-Work-Pool interface=VLAN-Work name=VLAN-Work-DHCP
add address-pool=VLAN-Printer-IOT-Pool interface=VLAN-Printer-IOT name=\
VLAN-Printer-IOT
/interface bridge port
add bridge=Bridge-LAN frame-types=admit-only-untagged-and-priority-tagged \
interface=ether2-LAN pvid=10
add bridge=Bridge-LAN frame-types=admit-only-untagged-and-priority-tagged \
interface=ether3-LAN pvid=10
add bridge=Bridge-LAN frame-types=admit-only-untagged-and-priority-tagged \
interface=ether4-LAN pvid=10
add bridge=Bridge-LAN frame-types=admit-only-untagged-and-priority-tagged \
interface=ether5-LAN pvid=10
add bridge=Bridge-LAN frame-types=admit-only-untagged-and-priority-tagged \
interface=Wifi2-2.4ghz pvid=10
add bridge=Bridge-LAN frame-types=admit-only-untagged-and-priority-tagged \
interface=Wifi1-5ghz pvid=10
add bridge=Bridge-LAN frame-types=admit-only-untagged-and-priority-tagged \
interface=Wifi2-2.4ghz-Work pvid=20
add bridge=Bridge-LAN frame-types=admit-only-untagged-and-priority-tagged \
interface=Wifi2-2.4ghz-Printer-IOT pvid=30
/ip neighbor discovery-settings
set discover-interface-list=VLAN-Admin
/ip settings
set rp-filter=loose
/ipv6 settings
set accept-redirects=no accept-router-advertisements=no disable-ipv6=yes \
forward=no
/interface bridge vlan
add bridge=Bridge-LAN tagged=Bridge-LAN untagged=Wifi2-2.4ghz-Work vlan-ids=\
20
add bridge=Bridge-LAN tagged=Bridge-LAN untagged=\
ether2-LAN,ether3-LAN,ether4-LAN,ether5-LAN,Wifi1-5ghz,Wifi2-2.4ghz \
vlan-ids=10
add bridge=Bridge-LAN tagged=Bridge-LAN untagged=Wifi2-2.4ghz-Printer-IOT \
vlan-ids=30
/interface list member
add interface=ether1-WAN list=WAN
add interface=VLAN-Home list=VLAN
add interface=VLAN-Work list=VLAN
add interface=VLAN-Home list=VLAN-Admin
add interface=VLAN-Printer-IOT list=VLAN
/ip address
add address=192.168.10.1/24 interface=VLAN-Home network=192.168.10.0
add address=192.168.20.1/24 interface=VLAN-Work network=192.168.20.0
add address=192.168.30.1/24 interface=VLAN-Printer-IOT network=192.168.30.0
/ip cloud
set update-time=no
/ip dhcp-client
add interface=ether1-WAN
/ip dhcp-server lease
add address=192.168.10.15 client-id=1:XX:XX:XX:XX:XX:XX mac-address=\
XX:XX:XX:XX:XX:XX server=VLAN-Home-DHCP
add address=192.168.10.16 client-id=1:XX:XX:XX:XX:XX:XX mac-address=\
XX:XX:XX:XX:XX:XX server=VLAN-Home-DHCP
add address=192.168.30.8 client-id=1:XX:XX:XX:XX:XX:XX mac-address=\
XX:XX:XX:XX:XX:XX server=VLAN-Printer-IOT
/ip dhcp-server network
add address=192.168.10.0/24 dns-server=192.168.10.1 gateway=192.168.10.1
add address=192.168.20.0/24 dns-server=192.168.20.1 gateway=192.168.20.1
add address=192.168.30.0/24 dns-server=192.168.30.1 gateway=192.168.30.1
/ip dns
set allow-remote-requests=yes
/ip firewall address-list
add address=192.168.10.15 list=Authorized
add address=192.168.10.16 list=Authorized
/ip firewall filter
add action=accept chain=input comment="accept established,related,untracked" \
connection-state=established,related,untracked
add action=drop chain=input comment="drop invalid" connection-state=invalid
add action=accept chain=input comment="accept ICMP" protocol=icmp
add action=accept chain=input comment="admin access" in-interface-list=\
VLAN-Admin src-address-list=Authorized
add action=accept chain=input comment="users to services" dst-port=53 \
in-interface-list=VLAN protocol=udp
add action=accept chain=input comment="users to services" dst-port=53 \
in-interface-list=VLAN protocol=tcp
add action=drop chain=input comment="drop all else"
add action=fasttrack chain=forward comment="fasttrack" \
connection-state=established,related
add action=accept chain=forward comment=\
"accept established,related,untracked" connection-state=\
established,related,untracked
add action=drop chain=forward comment="drop invalid" connection-state=invalid
add action=accept chain=forward comment="internet traffic" in-interface-list=\
VLAN out-interface-list=WAN
add action=accept chain=forward comment=\
"Access Printer on Printing Network from Home Network" dst-address=\
192.168.30.8 in-interface=VLAN-Home out-interface=VLAN-Printer-IOT
add action=drop chain=forward comment="drop all else"
/ip firewall nat
add action=masquerade chain=srcnat out-interface=ether1-WAN
/ip ipsec profile
set [ find default=yes ] dpd-interval=2m dpd-maximum-failures=5
/ip service
set telnet disabled=yes
set ftp disabled=yes
set www disabled=yes
set ssh disabled=yes port=2421
set api disabled=yes
set api-ssl disabled=yes
/ip ssh
set strong-crypto=yes
/ipv6 firewall filter
add action=drop chain=input comment="Drop all IPv6 input traffic"
add action=drop chain=forward comment="Drop all IPv6 forward traffic"
/ipv6 nd
set [ find default=yes ] disabled=yes
/system clock
set time-zone-name=Europe/Berlin
/system logging
add topics=wireless
/system note
set show-at-login=no
/system ntp client
set enabled=yes
/system ntp client servers
add address=0.pool.ntp.org
add address=1.pool.ntp.org
add address=2.pool.ntp.org
add address=3.pool.ntp.org
/system scheduler
add interval=1w name="1.1 MO Wifi-Work enable" on-event=\
"/interface wifi enable Wifi2-2.4ghz-Work" policy=write start-date=\
2024-12-30 start-time=07:00:00
add interval=1w name="1.2 MO Wifi-Work disable" on-event=\
"/interface wifi disable Wifi2-2.4ghz-Work" policy=write start-date=\
2024-12-30 start-time=20:00:00
add interval=1w name="2.1 TU Wifi-Work enable" on-event=\
"/interface wifi enable Wifi2-2.4ghz-Work" policy=write start-date=\
2024-12-31 start-time=07:00:00
add interval=1w name="2.2 TU Wifi-Work disable" on-event=\
"/interface wifi disable Wifi2-2.4ghz-Work" policy=write start-date=\
2024-12-31 start-time=20:00:00
add interval=1w name="3.1 WE Wifi-Work enable" on-event=\
"/interface wifi enable Wifi2-2.4ghz-Work" policy=write start-date=\
2025-01-01 start-time=07:00:00
add interval=1w name="3.2 WE Wifi-Work disable" on-event=\
"/interface wifi disable Wifi2-2.4ghz-Work" policy=write start-date=\
2025-01-01 start-time=20:00:00
add interval=1w name="4.1 TH Wifi-Work enable" on-event=\
"/interface wifi enable Wifi2-2.4ghz-Work" policy=write start-date=\
2025-01-02 start-time=07:00:00
add interval=1w name="4.2 TH Wifi-Work disable" on-event=\
"/interface wifi disable Wifi2-2.4ghz-Work" policy=write start-date=\
2025-01-02 start-time=20:00:00
add interval=1w name="5.1 FR Wifi-Work enable" on-event=\
"/interface wifi enable Wifi2-2.4ghz-Work" policy=write start-date=\
2025-01-03 start-time=07:00:00
add interval=1w name="5.2 FR Wifi-Work disable" on-event=\
"/interface wifi disable Wifi2-2.4ghz-Work" policy=write start-date=\
2025-01-03 start-time=20:00:00
/tool bandwidth-server
set enabled=no
/tool mac-server
set allowed-interface-list=none
/tool mac-server mac-winbox
set allowed-interface-list=VLAN-Admin
/tool mac-server ping
set enabled=no