1. A method comprising: providing a plurality of bins stored in a memory, each of the bins including a number of rules, each rule specifying a source port range and a destination port range; identifying, from the plurality of bins, a bin corresponding to a network path and a protocol of a received packet; comparing a source port and a destination port of the received packet with the rules of the corresponding bin; and if the source port of the received packet is within the source port range of a rule and the destination port of the received packet is within the destination port range of the rule, applying an action associated with the rule to the received packet.