Firewalls

Firewalls

This help document describes the ports that CUPS uses so that firewall administrators can allow traffic used for printing.

Ports Used for Printer Sharing

Table 1 lists the ports that are used for IPP printer sharing via CUPS.

Table 1: Ports Used for IPP Printer Sharing
(Destination) PortTCP/UDPDirectionDescription
53 (DNS)TCP/UDPOUTDomain Name System lookups and service registrations.
631 (IPP/IPPS)TCPINInternet Printing Protocol requests and responses (print jobs, status monitoring, etc.)
5353 (mDNS)UDPIN+OUTMulticast DNS lookups and service registrations.

Table 2 lists the ports that are used for SMB (Windows) printer sharing, typically via the Samba software.

Table 2: Ports Used for SMB Printer Sharing
(Destination) Port(s)TCP/UDPDirectionDescription
137 (WINS)UDPIN+OUTWindows Internet Naming Service (name lookup for SMB printing).
139 (SMB)TCPINWindows SMB printing.
445 (SMBDS)TCPIN+OUTWindows SMB Domain Server (authenticated SMB printing).

Ports Used for Network Printers

Table 3 lists the ports for outgoing network traffic that are used for network printers.

Notes:
  1. DNS and mDNS are used for all printing protocols except SMB.
  2. SNMP is used to provide status and supply level information for AppSocket and LPD printers.
Table 3: Outgoing Ports Used for Network Printers
(Destination) Port(s)TCP/UDPDescription
53 (DNS)TCP/UDPDomain Name System lookups.
137 (WINS)UDPWindows Internet Naming Service (name lookup for SMB printing).
139 (SMB)TCPWindows SMB printing.
161 (SNMP)UDPSNMP browsing (broadcast) and status monitoring (directed to printer IP address).
443 (IPPS)TCPInternet Printing Protocol requests and responses (print jobs, status monitoring, etc.)
445 (SMBDS)TCPWindows SMB Domain Server (authenticated SMB printing).
515 (LPD)TCPLine Printer Daemon (LPD/lpr) print job submission and status monitoring.
631 (IPP/IPPS)TCPInternet Printing Protocol requests and responses (print jobs, status monitoring, etc.)
5353 (mDNS)UDPMulticast DNS lookups.
9100-9102TCPRaw print data stream (AppSocket/JetDirect).