Created on
06-05-2015
02:47 AM
Edited on
12-16-2024
05:37 AM
By
Anthony_E
Description
Solution
- Create a Custom Service by going to Firewall Object/Service/Services and select 'Create New'.
Name: Port-8000.
Protocol Type: TCP/UDP/STCP.
Protocol: TCP.
Destination Port: 800.
Leave the other fields blank.
Select 'OK' to save.

- Create the Local-In Policy. This step has to be configured from the CLI.
config firewall local-in-policy
edit 1
set intf "wan1" <----- External interface.
set srcaddr "all" <----- Source.
set dstaddr "all" <----- Destination.
set action deny <----- Action.
set service "Port 8000" <----- Custom Service created in step 1.
set schedule "always"
set status enable
end
Note:
In case the local-in policy was already configured to allow 'ALL' services, use the following command to move the newly configured denied policy on top of the allowed policy:
config firewall local-in-policy
move <New policy ID> before <Old policy ID>
To verify the settings, from the CLI type:
config firewall local-in-policy
show full
This policy cannot be checked from the WEB GUI, only from the CLI.
Starting from v7.6.0, it is possible to create the same policy from GUI as well.
Check the following article for creating local-in policies from GUI: Technical Tip: Creating a Local-In policy (IPv4 and IPv6) on GUI
Note:
Ports that are handled by Session Helpers like SIP or SCCP are not affected by this change.
Related articles:
Troubleshooting Tip: FortiGate session table information
Technical Tip: Disabling VoIP Inspection
Technical Tip: Enable and disable FortiGate system session helpers