Sharing Linux Printers Across Multiple Subnets
Configuring CUPS For Two Subnets
All you need to make this work are a central Linux/CUPS printer server, and one Linux PC per subnet to act as a relay printer server.
Let's say you have two subnets, 192.168.1.0/24 and 192.168.2.0/24. You need to have routing already configured to pass traffic between the two subnets, so everyone can ping everyone. Let's say you have your CUPS printer server at 192.168.1.10, and you want computers on 192.168.2.0/24 to be able to use it. This is a complete, barebones example CUPS configuration for 192.168.1.10:
##/etc/cups/cupsd.conf LogLevel warning #this varies; check your distribution SystemGroup lpadmin # Allow remote users to access this server Port 631 Listen /var/run/cups/cups.sock # Enable printer sharing Browsing On BrowseAllow all BrowseAddress 192.168.1.255 BrowseAddress 192.168.2.255 DefaultAuthType Basic# Allow shared printing Order allow,deny Allow 192.168.1.0/24 Allow 192.168.2.0/24 # Only local users can access Web admin pages Order allow,deny Allow localhost # Only local system users can access config files AuthType Basic Require user @SYSTEM Order allow,deny Allow localhost
You may use hostnames in place of IP addresses. Then restart CUPS, either /etc/init.d/cupsys restart on Debian-ish systems, or /etc/init.d/cup restart on Fedora/Red Hat-ish systems.
- Skip Ahead
- 1. Configuring CUPS For Two Subnets
- 2. Setting Up the Relay PC
Managing a mixed IT infrastructure is always a challenge. The challenge is compounded for mid-sized companies where you don't have the staff resources of larger firms. A variety of systems and equipment creates a complex infrastructure where finding and solving performance and network glitches is really difficult. Learn how Hitachi IT Operations Analyzer can help.