Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How should one go about choosing a default TCP/IP port for a new service?

Tags:

networking

tcp

People also ask

How do I choose a port for my service?

But many times what happens with those applications a front-end web proxy connects 8080 or 8888 to port 80. Generally you should just use port 80 for ease of access. Anything else would require something like 123.456. 789.0:8080 or example:8080 .

What is the default port for TCP IP?

The new default start port is 49152, and the new default end port is 65535.

How are TCP ports assigned?

Port numbers are divided into ranges as follows: Port numbers 0-1023 – Well known ports. These are allocated to server services by the Internet Assigned Numbers Authority (IANA). e.g Web servers normally use port 80 and SMTP servers use port 25 (see diagram above).


Go here and pick a port with the description Unassigned


First step: look at IANA listing :

There you will see at the tail of the list

"The Dynamic and/or Private Ports are those from 49152 through 65535"

so those would be your better bets, but once you pick one you could always google on it to see if there is a popular enough app that has already "claimed" it


If by widely-used, you mean you want to protect against other people using it in the future, you can apply to have it marked as reserved for your app by IANA here


The most comprehensive list of official IANA port numbers and non-official port numbers I know is nmap-services.