title: Packet filter in Python?
body: <p>I have not seen any questions regarding to packet filter in Python and I am wondering, If it's possible to build it at all.</p>
  
  <p>Is there any way building a custom firewall in Python? Null-routing specific IP's for example, or blocking them when request amount capacity is reached in 5 seconds. </p>
  
  <p>What modules would it need, would it be extra difficult? Is Python useful for things like firewall?</p>
  
  <p>Also would it be possible to add powerful protection? So it can filter packets on all the layers.</p>
  
  <hr>
  
  <p><strong>I'm not asking for script or exact tutorial to build it, my sorted question:</strong></p>
  
  <p>How possible would it be to build firewall in Python? Could I make it powerful enough to filter packets on all layers? would it be easy to build simple firewall?</p>