Configuring Firewall to use CUPS

I have a shared printer on a linux server
what services should I enable in the firewall on a Linux client,
to use the shared printer with CUPS?

When I disable the firewall, I have full access to this printer.
But with firewall enabled, the printer can not be accessed.

Thanks in advance

CUPS normally listens on port 631.

That said, you should not need to open any port on the client, you should be able to access the printer even with all ports closed.
But CUPS won’t see the network printer automatically in this case, you would have to add it manually.

On 2014-08-01 14:46, sergelli wrote:
>
> I have a shared printer on a linux server
> what services should I enable in the firewall on a Linux client,
> to use the shared printer with CUPS?

On the client, nothing, although you can open it.

> When I disable the firewall, I have full access to this printer.
> But with firewall enabled, the printer can not be accessed.

Meaning you can not “find” it. You should be able to access and use it.

Further reading:

http://en.opensuse.org/Portal:Printing/Navigation
http://en.opensuse.org/SDB:CUPS_and_SANE_Firewall_settings


Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))

I frequently connect to CUPS servers (MAC machines and Linux machines) and it does require port 631 open for discovery (using CUPS browsing) at least. openSUSE 13.1 is using CUPS 1.5

https://www.cups.org/documentation.php/doc-1.5/sharing.html?VERSION=1.5&Q=

Clients can automatically discover and access shared printers via CUPS browsing, IPP, Service Location Protocol (SLP), and Lightweight Directory Access Protocol (LDAP). DNS Service Discovery (DNS-SD a.k.a. Bonjour®) and SMB browsing can also be used to manually discover and access shared printers.

It is important to note that this discovery protocol has been deprecated and is not supported at all with CUPS 1.6 onwards.

https://www.cups.org/documentation.php/doc-1.5/spec-browsing.html?VERSION=1.5&Q=

Instead, for CUPS 1.6 onwards

Clients can automatically discover and access shared printers via DNS Service Discovery (DNS-SD a.k.a. Bonjour®). SMB browsing can also be used to manually discover and access shared printers when Samba is installed.

Friends, thanks for the help. I have tried to find solution on the tips that you, gave me, but I did not succeed.
I still can not use the network printer with the firewall turned on.

Excuse my lack of knowledge,

Please, any new idea ?.

Port 631 open is sufficient if client and server are running CPS 1.5. However, if the server (or client) are using CUPS 1.6, then CUPS browsing and polling has been dropped, and Bonjour/DNS-SD is used. So, please confirm CUPS versions being used on both server and client.

Report back with output from the client machine

lpstat -s

I think the person opening the thread doesn’t know how to open a port in a firewall. Also is this 631 UDP or TCP ?

The easiest way to open the ports would be using YaST :
https://activedoc.opensuse.org/book/opensuse-123-security-guide/chapter-13-masquerading-and-firewalls#sec.security.firewall.SuSE.yast

Yes, perhaps that is the case, although they didn’t ask for specific help with opening the required port.

[QUOTE]Also is this 631 UDP or TCP ?


Both:  CUPS listens on TCP port 631 for IPP communication (for remote printers), and it uses UDP port 631 for sending/receiving "CUPS Browsing" packets for example.