How do you implement network security in cloud environments?
Implement an ordered IPv4 firewall evaluator that applies the first matching rule to each packet and denies packets with no match. Each rule contains a CIDR network, protocol, optional port, and action; "*" and null represent wildcards. Define evaluate_firewall(rules, packets) where rules and packets are lists of dictionaries, and return one action string per packet.
def evaluate_firewall(rules, packets):