Port 42

name and nameserver · TCP/UDP

RangeSystem/well-known port (0–1023)
ProtocolTCP/UDP
Servicename and nameserver

Frequently asked questions

What is port 42 used for?

Port 42 is registered with the IANA for name and nameserver (TCP/UDP). Description: Host Name Server.

Is port 42 a well-known port?

Yes. Port 42 is in the range 0–1023 (system or well-known ports). On Linux and macOS only privileged processes may bind to these ports.

How do I check whether port 42 is open?

Locally on Linux with ss -tulpn | grep ':42\b', on Windows with netstat -ano | findstr :42. To test a remote host use Test-NetConnection <host> -Port 42 in PowerShell or nc -zv <host> 42 on Linux/macOS.

How do I open port 42 in the firewall?

Ubuntu/Debian (ufw): sudo ufw allow 42/tcp. Fedora/RHEL (firewalld): sudo firewall-cmd --add-port=42/tcp --permanent, then firewall-cmd --reload. Windows (PowerShell as administrator): New-NetFirewallRule -DisplayName "Port 42" -Direction Inbound -Protocol TCP -LocalPort 42 -Action Allow.

IANA registry entries

ProtocolServiceDescription (IANA)
TCPnameHost Name Server
UDPnameHost Name Server
TCPnameserverHost Name Server
UDPnameserverHost Name Server

Nearby entries