Home > Articles > Security > Network Security

Choosing a Personal Firewall

Discover everything you never knew about personal firewalls and how you can choose the one that is best for you. You will learn the growing features of personal firewalls and how those features will better protect you.
This chapter is from the book

Personal firewalls make use of all the same methods as more robust, and expensive, enterprise firewalls. However, they simplify the operation of the product to meet the needs of a less technically savvy consumer. Where an enterprise firewall may require full-time supervision, a personal firewall is often installed and forgotten.

In order to better understand how personal firewalls work, we're going to examine each of the current standard firewall methods individually: network address translation, static packet filtering, stateful inspection, and application proxy. Personal firewalls often combine these standard methods to provide a more complete product, and even include additional features such as blocking on attack signature and intrusion detection.

We also briefly touch on a new effort to certify personal firewalls. It is believed that consumers will benefit from certified products, knowing that they have been compared against a set standard.

Network Address Translation

I would like to start off by saying that network address translation, or NAT, is not a firewall. NAT was never meant to protect computers. Network address translation is a method used to allow many computers to connect to the Internet with one (or few) public IP addresses. In essence, NAT is used when the number of hosts that need Internet access exceeds the number of public IP addresses that an organization has been assigned. The internal IP addresses come from a private pool as designated by RFC 1918, and a NAT device translates those private IP addresses to a public IP address that is routable on the Internet. The NAT device keeps track of the translations in an address translation table.

Private Address Ranges

RFC 1918 reserves these three address ranges for private use:

10.0.0.0–10.255.255.255 (10/8 prefix)

172.16.0.0–172.31.255.255 (172.16/12 prefix)

192.168.0.0–192.168.255.255 (192.168/16 prefix)

As an example of how this works, let's take your computer with an IP address of 10.1.1.1. This address is not routable on the Internet, based on the rules laid out in the RFC. In order for you to communicate outside your own network, you must route your traffic through a NAT device (NAT-capable firewall, router, switch, etc.). The NAT device then takes your IP packet, from 10.1.1.1:12345 to http://www.example.com:80, and translates your address to your routable IP address of 224.1.1.1:12346 (see Figure 3–1). When traffic returns from http://www.example.com:80 destined for 224.1.1.1:12346, the NAT device knows to forward it to

Figure 1FIGURE 3–1 Dynamic translation. Host A with an IP address of 10.1.1.1:12345 requests the Web page http://www.example.com:80. The router translates this address to the public IP address of 224.1.1.1:12346 and sends the packet on to http://www.example.com:80.

10.1.1.1:12345 (Figure 3–2). It is the combination of address and port that ensures traffic gets back to the correct requesting host. Once the communication session has ended, the table entry is deleted. This type of translation is dynamic.

Figure 2FIGURE 3–2 Dynamic translation. The host http://www.example.com:80 sends its reply to 224.1.1.1:12346. The router translates this back to the private address of 10.1.1.1:12345 and sends the packet on.

Static NAT is also possible and is used to allow contact to a specific host behind the NAT device. Static NAT would be used in the case of a Web server that has a private IP address but needs to be contacted by Internet users. The NAT device would have a specific translation defined for the Web server. For example, internally the Web server may be known as 10.1.1.2, but externally as 224.1.1.2. When Internet traffic is seen for 224.1.1.2, the NAT redirects it to 10.1.1.2. (Figure 3–3)

Figure 3FIGURE 3–3 Static translation. The host lisa.example.com:12356 tries to contact 224.1.1.2:80. The router translates the public address to the private IP address of 10.1.1.2:80 according to the defined table and passes the packet on. When traffic returns from 10.1.1.2:80 for lisa.example.com:12356, the router will change the private IP address back to the public IP address of 224.1.1.2

Dynamic NAT provides some protection for users behind the NAT device. When the translation tables are dynamic, there is no easy way for an external user (on the Internet) to initiate contact with a host behind the NAT device since the table entry is created when the internal host initiates an outgoing session and is deleted at the end of that session. Static NAT provides no real protection for the hosts behind it. Direct communication can be initiated with hosts having static translation information.

How NAT Is Implemented in Personal Firewalls

In order to perform network address translation, you must begin with a device that is able to route traffic from one network to another. This device will be "multi-homed," having one network connection on the private network and one on the public network. In addition to routing, this device will translate addresses from private to public. It uses a table to keep track of the translations.

Personal firewall software itself doesn't usually perform these functions. Some early hardware devices marketed as firewalls really only performed NAT, though. You still can find hardware devices that rely primarily on NAT as their method of protection. The consumer must be aware of how NAT works in order to judge whether this technology provides adequate protection.

Typically you find NAT functionality in a hardware router. Companies like Linksys, 3COM, SMC, Netgear, and even Cisco have products for the home market. Using a hardware device is simple since devices targeting home users generally come preconfigured for dynamic NAT. The device can serve out private IP addresses to the hosts connected to its internal network ports and it gets its public IP address from your Internet service provider. So, simply plug everything in and you're up and running in a dynamic NAT state. Dynamic NAT, as stated earlier, does provide a measure of security. It is difficult to establish a connection where the NAT mappings change regularly.

Static NAT requires more configuration. If you do wish to allow external hosts to connect to something on your private network, you will need a static route to provide the pathway. You would do this if you have a Web or mail or FTP server that you want others to be able to connect to. Static mapping is required to allow anyone to connect back in to one of your hosts.

If you can control the static mapping by port—only mapping traffic on port 80 back to the Web server, for example—it is better than having to map all traffic back to the Web server then hoping your host won't respond to requests on other ports. You are still at risk for non-HTTP applications tunneled over port 80.

If you cannot control the static mapping by port (eek), any type of traffic can be directed at your host. Hosts listen on the darndest of ports—ports you wouldn't expect. You can use netstat –an to see which ports your host is listening on in both Windows and Linux. The following is a sample from a default install of Windows XP.

C:\ >netstat -an
Active Connections
Proto   Local Address        Foreign Address    State
TCP     0.0.0.0:135          0.0.0.0:0          LISTENING
TCP     0.0.0.0:445          0.0.0.0:0          LISTENING
TCP     0.0.0.0:1025         0.0.0.0:0          LISTENING
TCP     0.0.0.0:1030         0.0.0.0:0          LISTENING
TCP     0.0.0.0:5000         0.0.0.0:0          LISTENING
TCP     69.254.132.171:139   0.0.0.0:0          LISTENING
UDP     .0.0.0:68            *:*
UDP     .0.0.0:135           *:*
UDP     .0.0.0:162           *:*
UDP     .0.0.0:445           *:*
UDP     .0.0.0:1026          *:*
UDP     .0.0.0:1029          *:*
UDP     .0.0.0:1035          *:*
UDP     .0.0.0:1174          *:*
UDP     27.0.0.1:123         *:*
UDP     27.0.0.1:1900        *:*
UDP     69.254.132.171:123   *:*
UDP     69.254.132.171:137   *:*
UDP     69.254.132.171:138   *:*
UDP     69.254.132.171:1900  *:*

Pretty interesting the number of ports that are waiting for connections by default. Ports 135, 139, and 445 are used to allow file sharing on Windows systems. They are automatically opened, even on this host with no internal network. Add to this concern the fact that Windows boxes also have administrative shares automatically created, and you learn why it is so dangerous to connect a Windows computer up to the Internet without some form of protection.

Who knows what application some of the ports identified as listening relate to. So, if you allow all traffic to your static NATed box, an external user could connect to an open share or some other unidentified application, unless you take other steps to protect your machine.

Let's look at a specific product. I have an older Linksys EtherFast Cable/DSL router at home. This product primarily performs NAT, allowing me to connect more than one computer to the Internet simultaneously. It assigns internal, private IP addresses using Dynamic Host Configuration Protocol (DHCP). I can filter outgoing connections, denying everything to specific IP addresses (destination IP 1.2.3.4 deny all), or denying specific ports to all IP addresses (destination any deny port 80). I can configure static mappings to specific port ranges and IP addresses or place specific IP addresses in "DMZ hosting" mode and allow all ports to that host (no restrictions). And all this is configured through a simple Web interface. I can get it up and running in dynamic NAT mode without any of the fancy options by simply plugging it in.

DMZ—Demilitarized Zone

In the security world, the DMZ is an area where you place systems that you allow remote hosts on the Internet to access. These systems, while protected, can never be fully trusted to be secure. As a result, they should not sit on the same network as your internal, critical systems. Think of the DMZ as a buffer zone between your internal LAN and the Internet.

The term "perimeter network" is sometimes used as well.

Sounds marvelous, doesn't it? We should be concerned about all this functionality, though. For one, no risk information is given in the manual for any features available. So, in the end it's up to you, the end user, to know what is happening and where there is risk.

There is no configuration screen on the Web interface for dynamic NAT, this just happens automatically. For static NAT, you use either the forwarding configuration settings or the DMZ hosting settings. Forwarding allows you to take traffic destined for a particular port on the public interface of the router, say traffic to port 80, and forward it through to a host on the private side of your router (Table 3–1). Setting a DMZ host, on the other hand, allows all traffic destined to your router to be passed on to the internal host.

TABLE 3–1 NAT Forwarding

Public IP

Port

Private IP

Service

224.1.1.1

25

172.16.1.3

Email server

224.1.1.1

53

172.16.1.5

DNS server

224.1.1.1

80

172.16.1.3

Web server


Let's review the risks, starting with the administration interface itself. First, the administration page is accessible with a published password. The documentation does encourage you to change this password. Question to you—will you change it? I've met IT professionals who fail to set or change default passwords, so I'm afraid I don't hold out much hope for the rest of the world.

The administration interface can be set to allow remote (i.e., over the Internet) configuration. Can you think of any problems with enabling this feature? Well, first off, did you set a password on the administration interface? Good, you did. How hard will it be to crack that password? That easy, huh? I was afraid of that. Remote management of your router should be seriously considered before being enabled. The only control over who can administer your router remotely is the password. If I find your router, and I guess the password (say, the default password—admin), I own your router. I can change the settings to put all your hosts into the "DMZ hosting" mode and then I can connect to them however I want. If you're an average, everyday computer user who simply set up the router and forgot about it, when do you think you'll figure out that I changed the settings on your router remotely? Maybe when someone complains that your host has hacked him or her. Maybe not even then.

The DMZ hosting feature is designed to allow a host to quickly and easily use an Internet service such as gaming or video conferencing. Rather than trying to sort out the correct packet filters (if it's even possible), you just allow all ports to a host. My attempt to be a hacker in the remote management paragraph above is a little inaccurate, then. I could only place one host on your internal network in the DMZ, not all of them. That should make you sleep better. You do recognize sarcasm, right?

So, if you really, really, really need to play Internet games or videoconference, you will need to enable the DMZ hosting feature for the one computer from which you will be performing these tasks. I wouldn't leave this feature enabled all the time, though; you should definitely deactivate the DMZ when you are done with your games. To be honest, I wouldn't even activate the DMZ feature unless I had another method of protection for my host (like a software firewall running on it). Call me paranoid. OK, to come completely clean, I even run a personal firewall on my computer at work (which is behind a corporate firewall) so I guess I am paranoid.

Those are my two big concerns with my Linksys, really. Remote configuration protected only by a password and this DMZ stuff that ends up being no protection for a specific host while it is enabled. Don't get me wrong, I love my Linksys router, it does exactly what I need it to do. I just don't want you to choose this device, or any other one like it, until you understand how it works. You might want more protection than network address translation can provide.

Another big factor for me is logging. Can a NAT device log? Of course. Are the logs of any value? That's a little more difficult to answer. The good news, for me, is that my router will log and can send those logs to a remote device. Great. In fact, my router logs incoming and outgoing traffic to separate files. Let's see what the outgoing log looks like.

Date         Time         Src            Src_Port   Dest                 Dest_Port
05/31/2002   12:13:24     192.168.1.100  4121       Webssl.example.com   443
05/31/2002   14:07:50     192.168.1.100  4135       Qtpix.apple.com      80
05/31/2002   14:07:52     192.168.1.100  4137       a772.g.akamai.net    80
05/31/2002   14:08:53     192.168.1.100  4138       Webssl.example.com   443

Knowing what is coming and going doesn't necessarily tell me anything useful. Will I recognize a Nimda scan entering or exiting with this information? No. I'll only know that a packet destined for port 80 traveled through the router. The ability to capture the full packet would be much more useful. We'll discuss logs in detail in a later chapter.

Products That Use This Method

We know that the Linksys Cable/DSL router employs NAT. It is an easy, inexpensive hardware device, and there are others like it available from various manufacturers. What other products are there? You can get more sophisticated devices—hardware appliances like a Netscreen or Pix firewall, for example—but now you start playing with the big guys—we've left the realm of personal firewalls far behind.

Cisco has products aimed at the home market with a firewall that can be purchased as an option. A basic 800 series router goes one step beyond NAT when you purchase the firewall option. However, you need to understand Cisco IOS to configure the router and firewall. For the corporate users out there, this may make sense, both from the expense and expertise perspectives. A hardware device that builds the VPN tunnel back to the corporate office, forcing all network traffic through the tunnel, might be even more useful for a corporate environment. This device effectively cuts off traffic from the outside world, and could allow such wonderful features as remote control of the home devices by corporate IT staff.

Network address translation is available in software as well. Typically, the functionality is part of the operating system, but it may need to be configured. Windows 2000 and XP have the Internet Connection Sharing (ICS) feature that works much like NAT. The documentation doesn't really cover any security aspects of this feature, though. The notes actually say that you must disable any personal firewall software you have running; no specifics are given on whether this is just on the ICS host, the clients, or both. Newsgroup postings mention that Internet Security System's BlackICE_ Defender, now called BlackICE_ PC Protection, does work with ICS, but others may have problems. Think long and hard before traveling down this road. Table 3–2 lists some NAT product options.

Linux provides a function called IP masquerade, or ipmasq. Ipmasq allows for dynamic NAT, or what the documentation refers to as one-to-many NAT. Static NAT is not possible with this package. The function is tied in with the firewall packages of ipchains and iptables, although it can be enabled without using any of the firewall's packet filtering features.

TABLE 3–2 NAT Product Options

Type

Product

Notes

Hardware

Home Cable/DSL router

Manufacturers include Linksys, 3COM, SMC, Netgear, and Cisco

Software

Internet Connection Sharing

Windows 2000, XP

 

ipmasq

Included with ipchains and iptables on Linux hosts


Advantages

One nice thing about a hardware device NAT is that it is platform-independent. You can plug any host in, request the IP configuration (DHCP client), and it will communicate. The NAT device is just passing packets. Really, the same can be said of any hardware-based firewall solution. As long as the firewall box is separate from your client boxes, it can manage the traffic for any operating system. So, if you have a network consisting of multiple operating systems at home, here's one product that will look after all of them, if your risk assessment will allow you to use NAT only.

Network address translation provides a way for multiple hosts to share a single IP address. In reality, this is why NAT exists; this is the problem NAT was meant to solve. That you gain any amount of protection from the "bad guys" through NAT is really just a side effect. As long as you require this functionality, NAT will have a place in your environment.

With the hardware devices being sold to the home market, NAT is fast, simple, and forgettable. It might actually even be enough protection for you. At the very least, you could probably argue that by employing NAT you were trying to protect your resources if you found you ever needed to defend yourself to someone else.

Disadvantages

Static NAT alone provides no protection. If you provide a static translation, then your internal host is no longer protected—you have given hosts on the Internet a way to contact your host directly. It is at this point that all the arguments about NAT making you invisible fall apart. And if you aren't invisible on the Internet, you are asking for someone to take advantage of your resources.

What about the ability to block outgoing traffic? NAT alone cannot do that for us. NAT does not really block traffic at all; it just doesn't know where to send requests from the Internet. This inability to block outgoing traffic leaves you vulnerable to anything that can be installed on your system that then connects out. Something like a virus that's designed to call home and hold a connection open might allow for remote control of your system.

Source Routing

Normally a packet is routed across the Internet to its final destination automatically. Each router along the way sends the packet one step closer to its destination. However, it is possible for routers to fail; either they no longer can communicate, or their routing tables are corrupted. This could lead to a block in the normal path that a packet must take.

Source routing was designed to allow you to get packets past such malfunctioning routers, essentially having them take a detour. With the proper tools, you can define the path that a packet must take, and encode that information in the header itself. Unfortunately, this ability can also be used for evil. Source routing can be used to get packets to destinations not normally available through standard routing.

How does it work? It's a little like trying to phone me. You look up my name in the phonebook, but I'm not there. You happen to know my partner's name is Jon, so you look up his name in the phonebook, and find it. Now you call up Jon and ask for Lisa when he answers. He happily passes you over to me. So much for my hiding behind his phone listing, it hasn't really protected me from getting phone calls.

The same is true with source routing. You want to reach 10.1.1.1 and you know that this host is behind a NAT device at 224.1.1.1. So, you craft a special packet for 10.1.1.1 and you tell the packet to go to 224.1.1.1 first and then ask for 10.1.1.1. Instead of relying on the Internet to route the packet, you give the packet directions.

To protect against this attack, you need a device that either does not support source routing or can turn off support for source routing.

Where NAT Fits in the Design of a Secure Environment

A NAT device at the perimeter is a good place to start. Think of network address translation as a networking technology, a communication enabler, rather than firewall. NAT provides some protection, but it was not designed to satisfy a security need; it was designed to solve a networking problem (see Figure 3–4).

Figure 4FIGURE 3–4 Network design with NAT. Multiple internal hosts are connected to the Internet by a hardware device that performs dynamic network address translation. It is hoped that this way the internal hosts can remain invisible to the Internet.

It's true, for many home users NAT may be all they need. I have a NAT device, and my personal firewall software is remarkably quiet; I am obviously being protected. With no picture of what is leaving my network, though, I worry. If an infection by a virus opens a back door, my NAT device doesn't protect me.

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020