[cups.general] Specify CUPS outgoing network interface and ip

Michael Sweet msweet at apple.com
Tue May 17 09:35:19 PDT 2011


On May 17, 2011, at 1:21 AM, jbrauchle wrote:
> Hello everyone,
> 
> I have a question about CUPS 1.3:
> My cups server has multiple network interfaces, and also multiple IPs per network interface. My printers have an access control feature based on IP addresses.
> 
> Example:
> ---------
>> ip addr show
> ..
> 6: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
>    inet 192.168.109.8/24 brd 192.168.109.255 scope global bond0
>    inet 192.168.109.13/24 brd 192.168.109.255 scope global secondary bond0
> ..
> ---------
> 
> Currently, CUPS seems to use the first IP address assigned to the interface (here: 192.168.109.8) on the target network. But this is not the IP address that is listed in the access control of my printers (which is 192.168.109.13).
> 
> The background is that my CUPS server shall run on in a high-availability cluster with multiple machines. The IP 192.168.109.13 is shared among the machines (i.e. the current active master machine has it). I configured the printers to accept print jobs only from this shared IP.
> 
> Now, I would like to specify exactly which IP CUPS uses (so here 192.168.109.13) when it connects to a printer.
> Is this possible?
> 
> I only found the "listen" setting in cups.conf, but this is obviously not helping here...


Are you trying to point a client at a specific IP address for a server, or at a specific IP address for a printer?

When communicating with a server or printer, CUPS looks up the address(es) for the given name and tries them in the order that is returned by the DNS server. The usual way of dealing with multiple IP addresses is to use a combination of unique hostnames and a shared CNAME that points to them. I am not sure that CUPS would be compatible with a hardware load balancer (where there is a single IP address shared among multiple servers) unless the load balancer maintains the association between client and server.

________________________________________________________________________
Michael Sweet, Senior Printing System Engineer, PWG Chair





More information about the cups mailing list