# Configuring a Location Policy

A location policy can permit, block, or implement traffic limiting for traffic of a country.

#### Prerequisites

The latest IP location database file has been loaded. For details, see Library Files.

Before configuring an IP location policy, you must Choose Defense > Policy Settings > Global Policy to enable location statistics.

#### Context

Many attacks on the Internet are launched by attacks by controlling zombie hosts. These zombie hosts may be centrally located in a specific region. A location policy can block or implement traffic limiting by region, effectively prevents attacks from a specific region. In addition, a location policy can take the pass action on traffic from a trusted region.

Public IPv4 addresses have been divided by country in the IP location database file. If the IP location division granularities in the IP location database file cannot meet requirements, you can create user-defined IP locations. For details, see Creating User-defined IP Locations.

After IP location function is enabled on the detecting device, no exception is reported, and traffic diversion is not triggered.

Only the inbound traffic supports an IP location policy. The outbound traffic does not.

#### Procedure

1. Choose Defense > Policy Settings > Zone.
2. Click of the Zone.
3. Click the Location Policy tab, click , and select the location and action. By default, the action of a location policy is Block.

   If the action is Traffic Limiting, you need to set the threshold for traffic limiting.

   If there are many IP location entries, you can enter a location name in Name and click for query.

4. Click OK.

Parent topic: Configuring the Zone-based Defense Policy

Copyright © Huawei Technologies Co., Ltd.