1<!DOCTYPE html>
2<html>
3<!-- SECTION: Getting Started -->
4  <head>
5    <title>Firewalls</title>
6    <link rel="stylesheet" type="text/css" href="../cups-printable.css">
7  </head>
8  <body>
9    <h1 class="title">Firewalls</h1>
10
11    <p>This help document describes the ports that CUPS uses so that firewall administrators can allow traffic used for printing.</p>
12
13    <h2 class="title" id="SHARING">Ports Used for Printer Sharing</h2>
14
15    <p>Table 1 lists the ports that are used for IPP printer sharing via CUPS.</p>
16
17    <div class="table"><table summary="Ports Used for IPP Printer Sharing">
18      <caption>Table 1: Ports Used for IPP Printer Sharing</caption>
19      <thead>
20        <tr><th>(Destination) Port</th><th>TCP/UDP</th><th>Direction</th><th>Description</th></tr>
21      </thead>
22      <tbody>
23        <tr><td>53&nbsp;(DNS)</td><td>TCP/UDP</td><td>OUT</td><td>Domain Name System lookups and service registrations.</td></tr>
24        <tr><td>631&nbsp;(IPP/IPPS)</td><td>TCP</td><td>IN</td><td>Internet Printing Protocol requests and responses (print jobs, status monitoring, etc.)</td></tr>
25        <tr><td>5353&nbsp;(mDNS)</td><td>UDP</td><td>IN+OUT</td><td>Multicast DNS lookups and service registrations.</td></tr>
26      </tbody>
27    </table></div>
28
29    <p>Table 2 lists the ports that are used for SMB (Windows) printer sharing, typically via the Samba software.</p>
30
31    <div class="table"><table summary="Ports Used for SMB Printer Sharing">
32      <caption>Table 2: Ports Used for SMB Printer Sharing</caption>
33      <thead>
34        <tr><th>(Destination) Port(s)</th><th>TCP/UDP</th><th>Direction</th><th>Description</th></tr>
35      </thead>
36      <tbody>
37        <tr><td>137&nbsp;(WINS)</td><td>UDP</td><td>IN+OUT</td><td>Windows Internet Naming Service (name lookup for SMB printing).</td></tr>
38        <tr><td>139&nbsp;(SMB)</td><td>TCP</td><td>IN</td><td>Windows SMB printing.</td></tr>
39        <tr><td>445&nbsp;(SMBDS)</td><td>TCP</td><td>IN+OUT</td><td>Windows SMB Domain Server (authenticated SMB printing).</td></tr>
40      </tbody>
41    </table></div>
42
43
44    <h2 class="title" id="PRINTERS">Ports Used for Network Printers</h2>
45
46    <p>Table 3 lists the ports for outgoing network traffic that are used for network printers.</p>
47
48    <blockquote><b>Notes:</b>
49      <ol>
50        <li>DNS and mDNS are used for all printing protocols except SMB.</li>
51        <li>SNMP is used to provide status and supply level information for AppSocket and LPD printers.</li>
52      </ol>
53    </blockquote>
54
55    <div class="table"><table summary="Outgoing Ports Used for Network Printers">
56      <caption>Table 3: Outgoing Ports Used for Network Printers</caption>
57      <thead>
58        <tr><th>(Destination) Port(s)</th><th>TCP/UDP</th><th>Description</th></tr>
59      </thead>
60      <tbody>
61        <tr><td>53&nbsp;(DNS)</td><td>TCP/UDP</td><td>Domain Name System lookups.</td></tr>
62        <tr><td>137&nbsp;(WINS)</td><td>UDP</td><td>Windows Internet Naming Service (name lookup for SMB printing).</td></tr>
63        <tr><td>139&nbsp;(SMB)</td><td>TCP</td><td>Windows SMB printing.</td></tr>
64        <tr><td>161&nbsp;(SNMP)</td><td>UDP</td><td>SNMP browsing (broadcast) and status monitoring (directed to printer IP address).</td></tr>
65        <tr><td>443&nbsp;(IPPS)</td><td>TCP</td><td>Internet Printing Protocol requests and responses (print jobs, status monitoring, etc.)</td></tr>
66        <tr><td>445&nbsp;(SMBDS)</td><td>TCP</td><td>Windows SMB Domain Server (authenticated SMB printing).</td></tr>
67        <tr><td>515&nbsp;(LPD)</td><td>TCP</td><td>Line Printer Daemon (LPD/lpr) print job submission and status monitoring.</td></tr>
68        <tr><td>631&nbsp;(IPP/IPPS)</td><td>TCP</td><td>Internet Printing Protocol requests and responses (print jobs, status monitoring, etc.)</td></tr>
69        <tr><td>5353&nbsp;(mDNS)</td><td>UDP</td><td>Multicast DNS lookups.</td></tr>
70        <tr><td>9100-9102</td><td>TCP</td><td>Raw print data stream (AppSocket/JetDirect).</td></tr>
71      </tbody>
72    </table></div>
73  </body>
74</html>
75