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.
JNDias
Staff & Editor
Staff & Editor
Article Id 246279
Description

This article describes how to use an external connector (IP Address Threat Feed) in a local-in-policy. The example in this article will block the IP addresses in the feed. However, it is also possible to use a policy to allow IP addresses, such as in a whitelist.

Scope From v7.2.4+  local-in-policy (CLI) | FortiGate v7.6.0+ (GUI)
Solution

GUI example:

In this example, it is configured an external IP threat feed named 'IP_Feed'.

 

salmas_0-1722179346880.png

 

Make sure to enable 'Local-In Policy' under System -> Feature Visibility to configure local-in policies from GUI.

 

salmas_1-1722179402622.png

 

Go to Policy & Objects -> Local-In Policy and select Create new.

 

Create_New.png

 

Note:

After v7.6.1+, local-in policies can not be configured with individual SD-WAN member interfaces but must be configured with the SD-WAN zone.

 

Refer to this article for more information: Troubleshooting Tip: Local-in, Central-SNAT, DoS policies etc are missing after upgrade to FortiOS v....

To block traffic with external threat feed for IP block list on SSL VPN with a local-in-policy, see Technical Tip: IOC as External resource to restrict random user login in SSL VPN.

 

CLI config example:

 

config system external-resource

    edit "External_IP_Feed"

        set type address

        set resource "http://<websiteaddressordomain>/tmp/IP_add_test.txt"

        set refresh-rate 1440

    next

end

 

config firewall local-in-policy

    edit 1

        set intf "any"

        set srcaddr "External_IP_Feed"

        set dstaddr "all"

        set action <accept or deny>

        set service "ALL"

        set schedule "always"

    next

end

 

Note: It may take a few minutes for the new IPs in the external list to be applied to the local-in-policy.

 

Result:

 

JNDias_0-1676647348282.png

 

Some troubleshooting commands:

 

diagnose sys external-address-resource list

diagnose sys external-address-resource list <name>

 

Example: 

 

diagnose sys external-address-resource list
List of external address resources:
name:External_IP_Feed, uuid-idx:15763, num of ipv4/ipv6 ranges:1433/0, used:yes

 

diagnose sys external-address-resource list External_IP_Feed
IPv4 ranges of uuid-idx 15763 (num=1433)
1.52.125.113-1.52.125.113
1.53.41.81-1.53.41.81
1.53.143.215-1.53.143.215
1.85.42.195-1.85.42.195
1.85.217.4-1.85.217.4

 

Related documents: