Image: nestat command
Use the Windows netstat command to list active ports on your server
R E L A T E D   C O N T E N T
ADVERTISEMENT

Hands on: All about ports

If you’re confused about network ports, you’ve come to the right place for help

Alan Stevens, Personal Computer World 26 Jan 2007
ADVERTISEMENT

In this month’s column I answer a query sent in by PCW reader Steven Parkes who, in common with several others, admits to being confused about network ports.

Here’s what Steven wrote: “Having grown up on the IBM XT and Dos, and learned all I know from magazines such as yours, I’m still confused about ports. Once there were about 6 (LPT1 & 2, and Com ports 1 to 4), now they seem to be numbered in their hundreds and unless we close them specifically, they seem to be wide open to any internet hacker.

“How many are there? Where are they? What do they consist of? Is there an accepted protocol for their use? If one is used for SMTP, for example (25 in my case), can it be specified for anything else? Can we close them ourselves without the help of firewalls? (A simple Dos command, or maybe a script, to shut them all, or all but those specified?).

“You can see I am in a muddle – I can’t believe that no-one else is!”

Where are the ports?
I’ll start with the easy stuff. The network ports that Steven talks about are nothing to do with the sockets or connectors found on the back of a PC, sometimes also referred to as ‘ports’.

It’s an easy mistake to make, especially as it’s usual to talk about them being open or closed and hackers getting ‘into’ a PC via open ports. However, to the question “where are they?” the answer is “not anywhere, really.” That’s because network ports are nothing more than labels that associate the network data packet contents with a particular application.

Think about it. You’ve got a server running several applications but it has only one network address. Each of these applications would have to look at every incoming network packet to determine whether or not it needs to do something with it.

It’s not impossible to do but it would require a lot of processing and really slow things down.

Tag each packet with a label saying which application it’s destined for and a lot less work is required. That’s exactly what a network port does, effectively extending the IP address to include not just the destination host but also a particular type of application or service running on it.

Applications can then be configured to respond only to the packets addressed to their specific port and they’re said to be ‘listening’ on that port. Most web servers listen on port 80, while most email servers listen on port 25 for SMTP traffic and 110 for Pop3.

So when you browse to a website, the packets will automatically have port 80 added to the end of the destination IP address by your browser software and when you send an email, the client software will append port 25 instead or port 110 when you retrieve messages with Pop3.


All Home Networks
Tags: Networks

Like this story? Spread the news by clicking below:

Post this to Delicious del.icio.us    Post this to Digg Digg this    Post this to reddit reddit!

Permalink for this story
R E A D E R   C O M M E N T S
M A R K E T P L A C E
Get your free demo of Numara Track-It! 8 - the leading help desk solution for IT related issues.
Make presentations, review documents & share your entire desktop. 30-day free trial! (cc required).
Discover how remote support can fuel your IT business in ways you've never thought of before.
Apply ITIL best practices at your service desk while eliminating integration cost. Learn more here.
WAN based, automated, daily vulnerability assessments. Click here to try and request our whitepapers.
Have your product or service listed here >   
Sponsored links
F E A T U R E D   J O B S
London, United Kingdom | City of London
ICT Project Officer - Guildhall, London EC2 18-month fixed-term contract Bring your project management expertise to one of the country's most prestigious institutions. The City of London is the local authority for the Square Mile, ... more >
London, United Kingdom | The Moving Picture Company
Web Developer - London   MPC's continued success is dependent on a continued investment in technology so that its clients continue to enjoy the highest possible quality of work and service. Key to MPC's offering is ... more >
London, United Kingdom | Feltham City Learning Centre
ICT Systems Administrator - Feltham City Learning Centre - £23,097 - £24,528 A full time ICT Systems Administrator to work in the Feltham City Learning Centre. This role requires a broad range of ICT skills ... more >
United Kingdom | Nottingham University NHS
Analyst/Developer - Nottingham University NHS - £24,103 - £32,653   An analyst/developer is required within the Systems Development Section of Nottingham University Hospitals ICT Services. The successful applicants will be part of a team whose ... more >
More job opportunities