Firewall plays an important role in network security, acting as an interface between networks. It implements the policy of the network by deciding on which packets are allowed through based on rules as defined in firewalls. Any error in definition of the rules, may affect the system security by letting unwanted traffic to pass or blocking desired traffic. However, managing rules for firewall, mainly for enterprise networks, has become complex and more error-prone. Firewall rules for filtering harmful packets have to be written, ordered and distributed carefully in order to avoid firewall policy anomalies that might cause network vulnerability.