[CentOS] CUPS oddity

Fri Apr 17 09:43:06 UTC 2009
Niki Kovacs <contact at kikinovak.net>

Hi,

I've been setting up a few printer servers with CUPS. Our public 
libraries here all run 100% Linux (CentOS 5), so what I do is simply 
install the printer on one of the machines (with a static IP) and then 
configure CUPS so it can act as a printer server for Linux clients.

It took me some time to figure this out, and I remember pulling my hair 
out for a few sunny afternoons, but I eventually got it working. One 
thing kept me stuck for days, until I finally found the answer on 
debian-administration.org.

My server machine has an IP of 192.168.1.252/255.255.255.0. There's a 
Brother laser printer attached to it. The CUPS configuration file is 
edited so machines on the 192.168.1.* network can use it, and I can also 
access the CUPS web interface from anywhere. But here's what puzzles me.

In the default cupsd.conf configuration file the 'Listen' directive 
looks like this:

# Only listen for connections from the local machine.
Listen localhost:631
Listen /var/run/cups/cups.sock

Here's the oddity: I *have* to specifically add the machine's IP, like this:

Listen localhost:631
Listen 192.168.1.252
Listen /var/run/cups/cups.sock

If I don't add this, machines on the network are unable to connect to 
the server.

Can anybody explain this strange behaviour to me?

Cheers,

Niki