The invention discloses an automatic query method and
system for a firewall policy. The method comprises the following steps: step S1, constructing a firewall
policy information base; step S2, setting query conditions, including a target
source address, a target destination address and target service data; step S3, acquiring one firewall policy from the firewall
policy information base; step S4, judging whether a
source address array, a target address array and a service array of the acquired firewall policy respectively include the target
source address, the target destination address and the target service data, if so, then executing step S5, and if not, then returning to step S3; step S5, conserving the acquired firewall policy to a query
result set; step S6, judging whether the acquired firewall policy is the last one in the firewall
policy information base, if so, then executing step S7, and if not, then returning to step S3; and step S7, outputting the query
result set. The automatic query method and
system for the firewall policy provided by the invention can realize the concentrated and unified management of the firewall policy, and improve the efficiency of firewall policy query.