Created on
06-05-2017
08:49 AM
Edited on
12-30-2024
12:01 AM
By
Jean-Philippe_P
Description
This article shows the configuration to protect a server from attacks from countries the user has no business with.
Scope
FortiGate.
Solution
First, create an address object:
Go to Policy&Object -> Addresses and then select 'create' and 'new address'.
Type: Select 'Geography'.
Country: Select the country to block.
Then, create a group for these countries that need to be blocked.
Go to Policy & Object -> IPv4 Policy.
If there is even 1 VIP policy on the FortiGate then this policy will not work as expected. To make this work ensure that in the policy itself add a command to match it to the VIP or add the destination as all The VIPs present in the destination instead of 'all'.
config firewall policy
edit <policy-id> <----- Here the policy ID would be of the 'Block Geolocation Traffic' as seen in the screenshot above.
set match-vip enableGeolocation also contains the Reserved option (ZZ) which denotes the addresses that are not assigned publicly.
Note:
- To restrict/allow access from specific countries through an SSL VPN tunnel, the following document can be referred to:
Restricting/allowing SSL VPN access from ... - Fortinet Community - The match-vip option is disabled by default until v7.2.3. In versions after 7.2.3, the option is enabled by default.
- The 'set match-vip' option is only available if the policy action is set to 'deny'.
Related documents:
Technical Note: How FortiGate can block Duolingo in different ways. Blocks web application.
Technical Note: Disconnecting a member from a cluster
Technical Tip: Commands to verify GeoIP information and troubleshoot GeoIP database
Technical Tip: How to block by country or geolocat... - Fortinet Community