SNORT is the most widely used open source IDS to date. SNORT has introduced inline mode which can be used to drop packets. Using inline mode, SNORT can be used as firewall as well. This paper outlines how to write common SNORT rules to protect against common web application attacks.
d603d7cd574e3847201f6539864090cf47b67e46dbdcd2a8dafbe7a0b3cb0807