<p>I have a Linux web server farm with about 5 web servers, web traffic is about 20Mbps.</p>

<p>We currently have a Barracuda 340 Load Balancer (keep away from this device - piece of crap!) that is acting as a firewall. I want to put in a dedicated firewall and I'd like to know what peoples opinions are on building versus buying a dedicated firewall. </p>

<p>Main requirements:</p>

<ul>
<li>Dynamically block rouge traffic</li>
<li>Dynamically rate limit traffic</li>
<li>Block all ports except 80, 443</li>
<li>Limit port 22 to a set of IPs</li>
<li>High availability setup</li>
</ul>

<p>Also if we go for the build route, how do we know what level traffic the system can handle.</p>

[{'answer_id': 48498, 'author': 'Rob Rolnick', 'author_id': 4798, 'author_profile': 'https://Stackoverflow.com/users/4798', 'pm_score': 0, 'selected': False, 'text': '<p>Don\'t know much about this field, but maybe an <a href="http://www.astaro.com/" rel="nofollow noreferrer">Astaro security gateway</a>?</p>\n'}, {'answer_id': 48515, 'author': 'Dominic Eidson', 'author_id': 5042, 'author_profile': 'https://Stackoverflow.com/users/5042', 'pm_score': 4, 'selected': True, 'text': '<p>As they say - "there are more than one way to skin a cat":</p>\n\n<p>Build it yourself, running something like Linux or *BSD. The benefit of this, is that it makes it easy to do the dynamic part of your question, it\'s just a matter of a few well-placed shell/python/perl/whatever scripts. The drawback is that your ceiling traffic rate might not be what it would be on a purpose-built firewall device, although you should still be able to achieve data rates in the 300Mbit/sec range. (You start hitting PCI bus limitations at this point) This may be high enough to where it won\'t be a problem for you.</p>\n\n<p>Buy a dedicated "firewall device" - Possible drawbacks of doing this, is that doing the "dynamic" part of what you\'re trying to accomplish is somewhat more difficult - depending on the device, this could be easy (Net::Telnet/Net::SSH come to mind), or not. If you are worried about peak traffic rates, you\'ll have to carefully check the manufacturer\'s specifications - several of these devices are prone to the same traffic limitations as "regular" PC\'s, in that they still run into the PCI bus bandwidth issue, etc. At that point, you might as well roll your own.</p>\n\n<p>I guess you could read this more as a "pro\'s and con\'s" of doing either, if you want.</p>\n\n<p>FWIW, we run dual FreeBSD firewalls at my place of employment, and regularly push 40+Mbit/sec with no noticeable load/issues.</p>\n'}, {'answer_id': 48516, 'author': 'Andreas Kraft', 'author_id': 4799, 'author_profile': 'https://Stackoverflow.com/users/4799', 'pm_score': 1, 'selected': False, 'text': "<p>Over the last 8 years we maintained a small development network with about 20 to 30 machines. We had one computer dedicated to be the firewall.</p>\n\n<p>Actually, we never run into serious problems we are now replacing it with a dedicated router/firewall solution (though we haven't decided yet which). Reasons for that are: simplicity (the goal is the firewall, not to maintain the linux for running it as well), less space and less power consumption.</p>\n"}, {'answer_id': 48563, 'author': 'Grey Panther', 'author_id': 1265, 'author_profile': 'https://Stackoverflow.com/users/1265', 'pm_score': 2, 'selected': False, 'text': '<p>Related to high availability: OpenBSD can be configured in a failover / HA way for firewalls. See <a href="http://www.countersiege.com/doc/pfsync-carp/" rel="nofollow noreferrer">this description</a>. I\'ve heard that they\'ve done demos where such setups done as well (if not better) as high-end Cisco gear.</p>\n'}, {'answer_id': 48572, 'author': 'Dale Ragan', 'author_id': 1117, 'author_profile': 'https://Stackoverflow.com/users/1117', 'pm_score': 2, 'selected': False, 'text': '<p>Definitely build.  I help manage an ISP and we have two firewalls built.  One is for fail over and for redundancy.  We use a program called <a href="http://www.pfsense.org/" rel="nofollow noreferrer">pfsense</a>.  I couldn\'t recommend this program more.  It has a great web interface for configuring it and we actually run it off a compact flash card.</p>\n'}, {'answer_id': 769660, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 0, 'selected': False, 'text': "<p>Hi I would go for a dedicated firewall product in this scenario. I have used the Checkpoint firewall range of products for many years and I have always found them to be easy to setup and manage and they have great support. Using Checkpoint or one of their competitors is a fairly expensive option, especially if you're comparing it to open source software, so it depends on your budget.</p>\n\n<p>I've also used Cisco's line of PIX and ASA firewalls. These are also good, but in my opinion are more difficult to manage </p>\n"}, {'answer_id': 8191574, 'author': 'pearcewg', 'author_id': 24126, 'author_profile': 'https://Stackoverflow.com/users/24126', 'pm_score': 2, 'selected': False, 'text': '<p>in my current startup, we have used PFSense to replace multiple routers/firewalls, and it has throughput which replaces much more expensive routers.</p>\n\n<p>Maybe that is why Cisco is having trouble? :)</p>\n'}]
['https://Stackoverflow.com/questions/48494', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5048/']