Firewalls are products that protect your computer from malicious intruders online. They can be either hardware or software. In order to understand how they work, you need to know a little bit about how the Internet works. Let’s compare how data is transmitted across the Internet to something we are all familiar with: mail and the U.S. Postal Service. Imagine, for a minute, that the post office only accepts postcards. On each postcard you are required to put a return address, a destination address, and the contents of your message. Let’s also imagine that these postcards can only hold a limited number of words; if you write a longer message, you will have to send several postcards. To ensure that the person receiving the message can read it, you also need to include a sequence number on the postcard. In terms of the Internet, each postcard is called a packet.
Each packet has a destination address and the address of the computer that sent it (the return address), which together are known as IP (Internet Protocol) addresses. Now, when you go into your local post office, there are usually two slots you can drop your postcards into. One slot is for local mail and the other is for nonlocal mail. These slots, when we talk about the Internet, are called ports. Each port is numbered, and there are more than 49,000 ports into and out of your computer. Some ports are associated with specific programs. For example, a Web server uses port 80 and an email server uses port 25. What does a firewall have to do with the Internet, packets, and IP addresses, you may be wondering? The firewall inspects the packets that come across the Internet into your computer. It is important to understand that the firewall sees the Internet as packets and IP addresses, not as URLs and programs. The firewall uses the information contained in the packets and the IP addresses to determine if any malicious data (such as a worm, virus, or Trojan horse) is coming into your PC through your online connection. If the firewall identifies something suspicious, it will block the packet from getting through.