Technical Tip: Local-in policies do not block DHCP requests on FortiGate
| Description | This article describes why a local-in policy does not block Dynamic Host Configuration Protocol (DHCP) requests on a FortiGate firewall. This is not a FortiGate product limitation, but rather a result of how the FortiOS kernel processes broadcast and system traffic. It also clarifies the supported methods for properly disabling or restricting the DHCP service on FortiGate interfaces. |
| Scope | FortiGate. |
| Solution | Purpose of Local-in Policy: Mostly unicast traffic addressed to the FortiGate’s own IP is evaluated by the local-in policy engine.
Why DHCP requests bypass local-in policy:
Result: Local-in policies never evaluate DHCP client requests. Clients continue to receive addresses even when a local-in rule is configured to block DHCP. This design ensures DHCP service remains available and avoids accidental disruption of critical system functions, such as:
Verification steps:
config firewall local-in-policy
From a client, test unicast traffic (e.g., ping the FortiGate). The ping fails, confirming the local-in policy is active.
Verify no hits appear against the DHCP-blocking policy:
diagnose firewall iprope show 100001 <policy id>
Correct methods to disable DHCP on FortiGate:
Disable the DHCP server:
config system dhcp server
Delete the DHCP server configuration:
config system dhcp server
The following shows the command and output to identify the DHCP server ID.
Prevent accidental re-enablement: Note: Disabling 'dhcp-relay-service' under an interface affects only relay, not the built-in DHCP server.
Packet flow diagram:
Unicast traffic like SSH/HTTPS/ICMP reaches here. However, DHCP broadcasts never reach this stage.
Conclusion:
|





