posted in Selfhosted

How do you isolate a printer in your homelab?

Hi all, I’ve gotten a Brother machine (DCP series) that can do wifi printing/scanning over their proprietary app. However, I’d like to lock it down from my network, because having it on the same LAN as my other devices and the ability to phone out to the internet seem like room for mischievious activities.

For context, I have OpenWRT on my router, and my clients can access the Brother using their iPrint&Scan app and AirPrint on wifi, as well as the traditional USB port. But I’m not good in networking. In my research, I drafted out the following solutions:

  1. Create a firewall rule to block the printer itself from making outbound requests. Seems simple, but I’m not sure if this can persist after IP changes or not.
  2. Create a VLAN for “IoT devices” that cannot send outbound requests to my normal VLAN nor the internet. Inspiration from this video, I’d need to manage a new SSID but it may come in handy for more IoT devices later.
  3. Hook the Brother up to a Raspberry Pi via USB, and install CUPS + SANE on the Pi. Assuming the Pi cannot “phone home” on behalf of the printer, this makes it a local-only “print+scan service” on my normal network and doesn’t require an extra VLAN.

I’d like to ask: which solution above is best for “neutering” the Brother? Or are there any alternatives/details I might’ve missed? I’m not sure if blocking outbound requests this way is enough of a security hardening for an untrusted device, and if there are any usability issues I’ve overlooked so far.

Thanks for any advice, and please share any printer/scanner setup you have in your networks as well. So hopefully I can get more inspiration!

Replying to @⁨rearview@lemmy.zip⁩

If it’s a networked printer it needs to be able to broadcast to the LAN if you want IPP to work – which you probably do, since it’s well supported by all OS and lets you autodiscover the printer and print directly from most of your devices.

This means you can’t isolate it fully from the LAN, so solution 2 is out.

Solution 1 is good if you can trust the thing not to change or disguise its MAC address. I’ve heard of devices that have a 3rd dynamic MAC in addition to the wifi and ethernet MACs, that they use to bypass such restrictions. 🤪

In order to do (1) properly you should create a firewall zone specifically for the printer, and allow that zone access to LAN but deny access to WAN. Then associate that zone with either a wifi access point created specifically for the printer, or with a specific switch plug if connected via Ethernet. This way the printer can’t bypass the restriction because it comes packaged with the only way it has of getting any connectivity.

However OpenWRT firewall zones also have issues with cross-zone broadcast, but can be bypassed I think by installing and using Avahi on the router. Don’t quote me on that.

Solution 3 seems best if you want to fully isolate it as well as retain IPP capability. That’s what I did with my printer, I connected it with USB to the server and I run CUPS + Avahi in a docker container that uses an ipvlan network to broadcast.

Replying to @⁨lemmyvore@feddit.nl⁩

Your comment about #2 is not true. VLANs can be fully isolated from other subnets on the LAN - sure. But they can also NOT be isolated. I have one fully isolated VLAN, and the rest are not isolated.

With a savvy user, you can also tehnically isolate VLANs form only specific other VLANs. I’ve never needed to do this, but know it’s possible.

Edit: for reference, I looked up details and found a helpful link and example:

5. Firewall zones for VLANs

config zone
    option name 'lan'
    option input 'ACCEPT'
    option output 'ACCEPT'
    option forward 'ACCEPT'     <-- This line allows intra-zone (inter-subnet) routing
    list network 'lan'
    list network 'your_new_vlan' <-- Adding your new VLAN here stops it from being isolated
openwrt.org[OpenWrt Wiki] 5. Firewall zones for VLANs
Edited ⁨⁨Nov⁩ ⁨9⁩, ⁨2026⁩, ⁨15:24⁩⁩en