Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Example uses

  • A backend webserver that is called by the world-visible webserver.
  • A static NAT table for the public to use a port number to specify which server they are connecting to.
  • A software that is developed by the company that will not be published, but used in-house.

I was just wondering if there was a standard section of port numbers that should be used. For example when it comes to DNS testing, or non-world-readable domains, there are items in RFC 2606 such as, *.test, etc.

share|improve this question
up vote 4 down vote accepted

UDP and TCP ports are assigned by IANA. The ones below 1024 are considered "the well-known ports" and shouldn't be used for anything other than their stated purpose (without good reason). The rest are pretty well fair game: Just let your users know what port to connect to, and keep some documentation for your site.

There is a range that is "unregisterable" (49152–65535) - This is the pool applications are supposed to grab from when they need to open a connection, but it's also available for you to use for whatever purposes you 'd like.

Wikipedia has a page with a prettified version of the port listing. You can also find it in /etc/services on most Unix machines.

share|improve this answer

As far as listening ports on services are concerned, there are the IANA-registered well-known ports, most of which lie below 1024.

Apart from those, you're free to use whatever ports suit you.

A comprehensive list is here:

In case you want to know, quick-and-dirty, what to use, go to 50000 and over.

Plenty of ports for everybody to go around, after all.

share|improve this answer
Plenty of ports for everybody to go around, after all. -- Didn't they say that about IPv4 addresses? – voretaq7 Dec 20 '11 at 17:29
Don't say we're running out! That's just a guvmint 'spiracy! – adaptr Dec 20 '11 at 17:53
@voretaq7 if you need more ports, just use another IP address. But it's one IP address per device, not one port per device - adding more devices to the internet doesn't consume a port, each device has its own set of ports – Random832 Dec 20 '11 at 19:02
@Random832 Your logic falls apart if I need more than 64K sockets on a single address. It also falls apart in terms of assigned ports (Port numbers are a finite resource, and IANA port assignments, while non-binding, are technically global) – voretaq7 Dec 20 '11 at 19:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.