title: IP Address Filtering
body: <p>I'm looking at implementing IP Address filtering for my Rails SaaS app. In a nutshell I want administrators to be able to specify one or more IP Addresses (or a range of IP Addresses) and then my app only accept requests on their instance from the specified addresses.</p>
  
  <p>I'm looking at using IPAddress (<a href="http://github.com/bluemonk/ipaddress" rel="noreferrer">http://github.com/bluemonk/ipaddress</a>) for the parsing/validating of each address/range of addresses. Is this a good fit or are there better/more appropriate libraries?</p>
  
  <p>Has anyone implemented this kind of filtering who could describe an approach that has worked for them or are there any gotchas I need to worry about?</p>
  
  <p>Alternatively, is there an existing Ruby library that handles all of this automatically that has managed to elude my Googling?</p>
  
  <p>Many Thanks,
  Ash</p>