There’s often a lot of talk in security articles about the danger of “open ports.” This subject seems to be the cause of more confusion and excessive paranoia than any other that I can think of. So, here’s a breakdown:
Basically, network communication is analogous to trying to send letters to people in an apartment building. In order to communicate with someone in one of these buildings by letter in real life, you need to know the street address, the apartment number, and what language they speak. An IP Address is like the street address of an apartment complex, ports are like specific apartments in this building, and protocols are what language each resident speaks. If no one is living in a particular apartment, it’s kept closed up until someone moves in.
Here’s the main issue: An open port is like an apartment that has someone living in it, who can receive letters. A closed port is like an apartment that is locked up, so letters don’t get delivered. If a building does not have someone watching to see who’s in these apartments, things can get a bit dicey. Maybe they’re a fine, upstanding citizen, or maybe they’re running a burglary ring out of their apartment. If no one is watching, no one knows!
This issue is part of why CodeRed and Slammer were such a problem - fine, upstanding web servers were installed by default in certain versions of Windows, but most people were unaware of this. So when warnings started coming out, most people ignored them, thinking it didn’t apply to them. “Just so you know, there are some letter-bombs coming to Bob Smith in Apartment A!” If people were not aware there was a Bob Smith living in their building, they’d likely ignore the warning.
On most people’s machines this situation is the case to some extent. Firewalls are like a security guard at the front desk who approves people coming into and going out of the apartment building. If you know one of those apartment dwellers well, you can set a rule that it’s always okay to send deliveries to and from them.
This isn’t 100% foolproof–no building or software is 100% ironclad. There are ways around even the tightest security. But the bottom line is, it does increase your overall security to have that kind of awareness of what is going into and out of your machine.