How Many Firewalls Do You Need?

Should you run a firewall on your production servers in addition to a boundary firewall? Or maybe one is all you need.

Lets say youre a really small operation. Youve got one server and you want to connect it the Internet. Obviously youre going to need a firewall. Do you need a whole separate system for it?

While many people will say that you should pull out an old 486 box and run IPTables for Linux on it, thats not what most people do. One thing they may do, as envisioned by Microsoft in their recently revealed Small Business Server 2003, is to run the firewall on the same box as their production and web server software.

See PC Magazines story on the new release candidate of Small Business Server 2003.

The same configuration was true in Small Business Server 2000 and Microsoft got some grief from some of their consultants for putting the firewall on the same box as the web server, the Exchange Server, and everything else. But thats the way Small Business Server works; everything runs on one server. The license and setup process prevent you from splitting off individual functions to separate boxes, although in the 2003 version it will be easier to buy a separate box with a separate copy of Windows and ISA to run on the same domain as Small Business Server.

Its not just Microsoft who does this. I run Winproxy from Ositis Software. While I run mine on a separate box not a member of my domain, they have a lot of support and documentation for people running it on a busier server. And surely the same is possible with any number of other commercial and free firewall products.

So why is it a problem to run a firewall in this way? Technically, what you do is to have two network cards in the server. The firewall sites in-between, probably performing NAT, guarding the traffic between the two networks. Whats the difference between this and having it on a separate box?

Apart from performance considerations, the arguments would be that if the firewall were compromised the attacker would have easy access to the resources on the rest of the server. Its a tad more complicated than that, but even if its true, how much more protected is a server on a separate box when the firewall system has been compromised? Im sure its a harder attack to make, but I bet youre still in trouble. Once an attacker has compromised your firewall you probably need to assume the rest of the network is his oyster.

The whole truth about ISA is that it does a lot more than firewall duty. Its also a proxy/cache server (the A is for Acceleration) and it integrates with Active Directory to let you set policies related to its use. For example, you can say that none of a particular group of users can surf the web during certain hours. I think Microsoft would not be offended if you use a Watchguard or Cisco firewall appliance and either shut off or de-emphasized the firewall functions on ISA. (You already paid for it, so what do they care?)

But you dont have to. In fact, if youre aggressive and have time on your hands, you may want to run firewalls internally on your production servers as well as at the network boundaries. This is one answer to the problem above of how to protect yourself if your boundary firewall is compromised. Ironically, the boundary firewall has to have more liberal entry-exit policies for communication than you would have for any individual server. For example, a web server might be able simply to allow HTTP and HTTPS, and a firewall on that system could block everything else. This is a good way of protecting against many attacks, known and unknown, that could be used to gain control of the server. The attacker could only use HTTP or HTTPS to attack. And if an attack came from a compromised system inside your network you would still be protected.

As explained on a fascinating thread on SecurityFocus Security-Basics list, there are upsides and downsides to running internal firewalls on your various servers. The main problem, in my mind, is that you have multiple firewalls to administer, and I think we all have real work to do rather than creating new administrative tasks. The upsides I explained above.

So firewalls on the line-of-business server may be a bit of a compromise if theyre all you have, but theyre also much better than nothing. If you dont like them, spend a few hundred bucks and put a firewall box from Linksys or WatchGuard on the network and youll actually have security redundancy.

Discuss this in the eWEEK forum.

Security Supersite Editor Larry Seltzer has worked in and written about the computer industry since 1983.