On 1/31/06, <b class="gmail_sendername">Preston Crawford</b> <<a href="mailto:preston.crawford@gmail.com">preston.crawford@gmail.com</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Is there an easy way to reject all incoming packets except those that
come from certain IPs? I can't find any way via iptables or via the GUI
provided with CentOS (or another GUI for CentOS) without having to
resort to Shorewall. It's fine if the answer is "go with Shorewall". I
just didn't want to have to become a Shorewall expert for this really
small task.<br>
<br>
Any help/advice on this is appreciated. Am I missing an easier way?<br><span class="sg">
<br>
Preston</span></blockquote><div><br>If the only thing you want to do is filter a limited number of IPs, Troy's example will work great.  But if you want other features in an easy-to-manage package, it might be worth checking out APF at:
<br><br><a href="http://www.rfxnetworks.com/apf.php">http://www.rfxnetworks.com/apf.php</a><br><br>I have been using it for a while... it has a lot of nice features (rate limiting of some traffic, logging, etc.) and makes it really easy to manage allow lists, block lists, and multiple IP addresses on the box.  
<br><br>I'm not aware of an RPM-based version, but the tarball install sticks everything in /etc/apf, so it's easy to remove if you want to.<br><br>Take care,<br>K<br></div><br></div>