Mod Rewrite and Blocking Bad Bot
A quick Apache mod_rewrite snippet that returns a 403 Forbidden to any request whose User-Agent matches a bot pattern. Drop it into your .htaccess and you are done.
read more
Mod_qos Tailblock
A lightweight bash script that monitors Apache error logs for repeated access-denied entries and automatically blocks offending IPs via iptables. Useful for quick-and-dirty rate-based blocking without a full WAF.
read more
Nginx Non-standard Status Silent Connection Close
Nginx status code 444 silently drops a connection without sending any HTTP response to the client. Learn when and how to use it for security and traffic management.
read more
Reject with Comment
A quick iptables one-liner to reject TCP traffic from a specific source IP with a TCP reset, tagged with a human-readable comment for future reference.
read more
Stop Slow Loris Attacks
Slow Loris attacks tie up web server sockets with trickling requests until legitimate traffic is starved. This post walks through configuring Apache mod_qos to detect and block those connections automatically.
read more
Structure of an AWS IAM Policy
An overview of how AWS IAM policies are structured, including the six policy types and the key elements of a policy document. Learn how to apply the principle of least privilege when defining permissions.
read more