Creating chained rules
Sometimes you want a match to trigger only if several conditions apply. Say for example that our web site owner from the previous example wanted to block the troublesome downloader, but this downloader was also used by other clients where it wasn't misbehaving by downloading the same file over and over. Also, for the sake of argument let's assume that it wouldn't be possible to just block the client's IP address as he was on DSL and frequently appeared with a new address.
What we'd want in this case is a rule that denies the request if the user-agent string contains "Red Bullet" and the IP address of the client belongs to the subnet range of a particular ISP.
Enter the chain
action. Using this, we can create a chain of rules that only matches if all of the individual rules in the chain match. If you're familiar with programming, you can think of chained rules as rules with a logical and
operator between them—if a single one of them doesn't match then the rule chain...