The Best Damn Firewall Book Period

Regardless of whether you are implementing a packet filter or a proxy server, a firewall provides several services. The most essential Linux firewall functions include:

Building a Personal Firewall

It is possible to use Iptables or Ipchains on a standard client system. A personal firewall can be helpful in the following situations:

When it comes to building any type of firewall, it is important to consider your own situation. The commands you learn in the next section will help you implement the proper solution.

Understanding Packet Filtering Terminology

Generally, whenever a packet passes through a firewall, it is compared to its rules. If a packet matches a rule, then the firewall processes the packet.

Whenever a packet enters a chain in Ipchains, it must pass all the way through before the kernel allows it to pass on to the operating system, or pass through to another host. Iptables uses a similar principle, except that it allows you to create specific tables that can be either processed or ignored, making the packet-filtering process quicker and more efficient. Iptables will likely become the standard for some time. Now that you understand some of the basic firewall terms, it is time to learn more about the most common uses of a Linux system in regard to routing and firewalling.

Many times, a router can be a completely separate host from the firewall. This is especially the case in medium to large networks, where it is necessary to balance the load between the two. However, routers commonly have features that allow you to program them as a packet filter. Linux is a particularly handy tool because it allows you to do both simple routing and packet filtering.

Note

Ipchains gets its name from the fact that it connects each of its rules in an order, much like connecting links in a chain.

Choosing a Linux Firewall Machine

Contrary to what you may think, a firewall does not necessarily have to be the most powerful system on your network. It should, however, be a dedicated host, which means that you should not run any other services. The last thing you want to do is configure your firewall to also be a Samba server or print server. Additional services may cause a performance drain, and may open up vulnerabilities as well.

Ideally, a small network would be well served by a typical Pentium III or Pentium IV system with 128MB of RAM and a 500MHz processor. Depending on the amount of traffic the network generates, however, you could get by with a much less powerful system. It is not uncommon to see a network with 25 systems accessing the Internet using a Linux router that is no more powerful than a low-end 300MHz system. A good NIC is vital for firewalls and routers.

Larger businesses, say, those with demands for Web surfing, e-mail retrieval, and additional protocols, may require a more powerful system. Considerations for more powerful systems might include:

Protecting the Firewall

One of the benefits of having a firewall is that it provides a single point that processes incoming and outgoing traffic. However, consider that a firewall can also provide a central point of attack or failure. A firewall does inform a hacker that a series of networks does exist behind it. If a hacker is able to defeat this one firewall, the entire network would be open to attack. Furthermore, if a hacker were able to somehow disable this host, the entire network would be denied all Internet services. It is important, therefore, that you take measures to protect your firewall. Consider the following options:

Категории