Wednesday, November 19, 2008

What port does a service use?




So far with this blog we've covered Port Forwarding and Basic Uses of Dynamic DNS. Which explain basically what to do with Dynamic DNS and how to set up your router to pass the traffic to your server.

But, what ports do you specify when forwarding? After all, there are over 65,000 ports available online! 

Many programs (IIS, FTP Server, Mail Servers) will have default ports that they use. Here is a quick rundown of a few common ports:

Service     Port
FTP   20,21
Telnet   23
SMTP   25
DNS   53
HTTP   80
POP3   110
NNTP   119
NTP   123
IMAP4   143
HTTPS   443
There is a little known file on your computer that goes into greater details about port numbers also. 

The file /etc/serviceson most Linux / Unix machines lists the port assignments for that machine.

On Windows, TCP/IP port assignments are stored in the C:\WINDOWS\SYSTEM32\DRIVERS\ETC\SERVICES file.

The original complete list of port assignments was in RFC 1700 - Assigned Numbers.

The most current official list of port assignments is maintained by the IANA (Internet Assigned Numbers Authority) at http://www.iana.org/assignments/port-numbers.

So that covers what ports to generally use. Now it is very common for Internet Providers to block common ports for incoming traffic. This means that your provider might not allow you to host a webserver on port 80, or a Mail Server on port 25. 

I'll cover running basic Internet Services on different ports in a post later today. Stay Tuned!

0 comments: