FortiGate
FortiGate Next Generation Firewall utilizes purpose-built security processors and threat intelligence security services from FortiGuard labs to deliver top-rated protection and high performance, including encrypted traffic.
evejar
Staff
Staff
Article Id 196741

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 in the 'address' label, select 'create new'.


schedule.gif

 

  • Name: Choose a name.
  • Type: Select 'Geography'.
  • Country: Select the country to block.
 
Do this for all the countries to block.
 
Then, create a group for these countries that need to be blocked.
 
Select 'create' and 'new address group'.
 

schedule2.gif

The last thing to do is to create a policy.
Go to Policy & Object -> IPv4 Policy.
 
Create a policy that blocks the traffic from the countries to the resources (like servers in the DMZ) that need to be protected.
Once this rule is created, the traffic from those countries will be blocked (this is to protect the server only, it does not block the internet).
 

schedule3.gif

 
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'.
 
Option 1: Enable match-vip in the block geolocation Policy:
 

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 enable
end
 
Option 2: Add all the VIPs that are used in the FortiGate:
 
vip block.PNG

Geolocation also contains the Reserved option (ZZ) which denotes the addresses that are not assigned publicly.

 

Note:

 

Related documents: