Port 631: IPP / CUPS

Port 631 (TCP/UDP) is used by IPP / CUPS. Internet Printing Protocol; CUPS web interface on Linux and macOS.

631Port
TCP/UDPProtocol
ippIANA service name
PrintingCategory

Port range

631 is a well-known (system) port (range 0–1023). On Linux and macOS, binding to it traditionally needs root or the CAP_NET_BIND_SERVICE capability.

Security

Only open port 631 to the hosts that need it. Prefer the encrypted variant of the protocol where one exists.

Open port 631 in a firewall

ufw         sudo ufw allow 631/tcp
            sudo ufw allow 631/udp
iptables    sudo iptables -A INPUT -p tcp --dport 631 -j ACCEPT
            sudo iptables -A INPUT -p udp --dport 631 -j ACCEPT
firewalld   sudo firewall-cmd --permanent --add-port=631/tcp
            sudo firewall-cmd --permanent --add-port=631/udp
Windows     New-NetFirewallRule -DisplayName "IPP / CUPS 631" -Direction Inbound -Protocol TCP -LocalPort 631 -Action Allow

Check if port 631 is open

nc -vz example.com 631
Test-NetConnection example.com -Port 631   # PowerShell
sudo ss -tulpn | grep ':631 '   # what is listening locally (Linux)

Other printing ports

Frequently asked questions

What is port 631 used for?
IPP / CUPS. Internet Printing Protocol; CUPS web interface on Linux and macOS.
Is port 631 TCP or UDP?
Both are assigned. Check which one your software actually listens on.