Selfhosted
A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.
Rules:
-
Be civil.
-
No spam.
-
Posts are to be related to self-hosting.
-
Don't duplicate the full text of your blog or readme if you're providing a link.
-
Submission headline should match the article title.
-
No trolling.
-
Promotion posts require active participation, with an account that is at least 30 days old. F/LOSS without a paywall has exceptions, with requirements. See the rules link for details. Tags [CBH] or [AIP] are required, see the links in Rule 8 for details.
-
AI-related discussions and AI-involved promotional posts have additional requirements for tagging, as noted in Rule 7 and the AI & Promotional Post Expanded Rules post, and find example disclosures here.
Resources:
- selfh.st Newsletter and index of selfhosted software and apps
- awesome-selfhosted software
- awesome-sysadmin resources
- Self-Hosted Podcast from Jupiter Broadcasting
Any issues on the community? Report it using the report flag.
Questions? DM the mods!
view the rest of the comments
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.
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
Damn, I didn't know devices do these dynamic MACs, but yeah it's not a trusted field to begin with.
By IPP autodiscovery, do you mean mDNS? If so, does the router needs to install avahi as well for single-network discovery to work? Or just the client?
Avahi on the router for multi VLAN discovery seem to be a nice idea, I'll look into it and maybe try to hook it up to solution 2. I've thought users could just manually input the IP addresses (and the non-tech users will just simply be onboarded by me anyways), but having it advertised by default may just be less of a hassle for them.
IPP is a universal printer protocol aka "print anywhere". Some printers support it natively, some need some help from a PC. If that PC runs Linux the most likely method is to run CUPS and connect it to the printer over USB.
Yes the autodiscovery is done with mDNS, which on Linux is done with Avahi.
Typically Avahi is needed if you consume services over mDNS or provide them.
So the Linux clients need Avahi. But the router only needs Avahi if the printer is connected to it, or to propagate broadcasts across zones.
You can, but it's really nice to have the printer available automagically (on any OS).
BTW one extra potential benefit of solution 3 might be that the "printer" would always appear to be present on the network and accept print jobs, even if the actual printer is off, because the Pi running the print server would actually be on. Otherwise if the printer itself is providing the connectivity and announcement it will not appear in the list when it's off. Whether you consider this a plus or not depends on how you handle your printers, I turn mine off when not in use, but some people let it go into powersaving mode so it's always ready to print.