Skip to main content
seshuganesh
Staff
Staff
December 6, 2022

Technical tip: Unable to block IP addresses accessing the firewall after creating the firewall policy

Description This article describes how to react when unable to block IP addresses accessing the firewall after creating the firewall policy.
Solution

The policy created should be applied only to the pass-through traffic. It will not be applied to the traffic which is hitting the firewall (destined to the firewall directly).

 

To create a policy in the firewall to control the traffic which is destined directly to the firewall, configure 'local in policy' in the FortiGate firewall to block the traffic for the WAN interface.

 

Use this document the same: Local-in policies

 

Use these commands to control the traffic:


config firewall local-in-policy
    edit <policy_number>
        set intf <interface>
        set srcaddr <source_address> [source_address of the blocked IP]
        set dstaddr <destination_address> [destination_address]
        set action {accept | deny}
        set service <service_name> [name of the specific service]
        set schedule <schedule_name>
    next
end

 

Note:
Starting from v7.6.0, custom Local-in-Policy can also be configured in the GUI. Refer to this KB articlefor reference: Technical Tip: Creating a Local-In policy (IPv4 and IPv6) on GUI

    Thought Leadership. Security Summit. Thursday, November 12th, PGA National Resort, Palm Beach Gardens, FL.
    Thought Leadership. Security Summit. Thursday, October 8th. Disney's Grand Californian Hotel & SPA, Anaheim, CA.
    Security Operations Summit: Modernize SecOps. Operate AI-Native.AMER: November 4 | 9:00 AM PST. India and SAARC: November 5 | 10:00 AM IST. EMEA: November 5 | 10:30 AM CET. APAC: November 5 | 11:00 AM SGT