Port 42
name and nameserver · TCP/UDP
| Range | System/well-known port (0–1023) |
|---|---|
| Protocol | TCP/UDP |
| Service | name 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
| Protocol | Service | Description (IANA) |
|---|---|---|
| TCP | name | Host Name Server |
| UDP | name | Host Name Server |
| TCP | nameserver | Host Name Server |
| UDP | nameserver | Host Name Server |