Solution | Starting from FortiOS v7.6.0, Local-In policies can be created on the GUI.
In previous firmware versions, this option was only available via the CLI. See Local-in policy. Â Enable the Local-In policy by going to System -> Feature Visibility, searching for Local-In Policy, and enabling it.
  Local-In Policy can also be enabled in CLI:
configure system settings
  set gui-local-in-policy enable
end
 Once enabled, go to Policy & Objects -> Local-In Policy and select 'Create new'.
   The option remains the same as the CLI; it is just necessary to select the details on the GUI.
Â
config firewall {local-in policy | local-in-policy6}
  edit <policy number>
    set int <interface>
    set srcaddr <source address>
    set dstaddr <destination address>
    set action {accept | deny}
    set service <service name>
    set schedule <schedule name>
    set virtual-patch {enable| disable}
   set comments <string>
   next
end
 Here is the example:
config firewall local-in policy
  edit 9
    set intf "port2"
    set srcaddr "all"
    set dstaddr "all"
    set action accept
    set service "HTTPS" "HTTP" "SSH"
    set schedule "always"
  next
end
 In the GUI: Select the relevant interface or zone, which is usually the outbound (internet-facing) interface/zone, and then create the addresses that shall be allowed/blocked accordingly. Once done, select parameters such as destination, service, and action as per the requirement.
               Note: Particular attention is required when removing Local-in Policies in setups where SSL VPN is restricted by Geo-location, as this can unintentionally deny VPN access to all users, including those from allowed IP ranges. More details regarding this procedure are provided in Technical Tip: How to safely delete Local-in Policies when SSL VPN with a Geo-Location restriction is applied.  The Negate option can also be used for source and destination addresses in both local-in policies and firewall policies by enabling Policy Advanced Options under System -> Feature Visibility. (For more details, see Technical Tip: Firewall Policy 'Negate' option.) Notes:
As best practices, consider the following recommendations:Â
config firewall local-in policy
  edit 9
    set intf "ZONE" ----- ZONE Name
    set srcaddr "all"
    set dstaddr "all"
    set action accept
    set service "HTTPS" "HTTP" "SSH"
    set schedule "always"
  next
end
|