Technical Tip: Blocking incoming traffic on UDP port 520 (RIP) from blocked countries
| Description | This article describes a step-by-step guidance on how to block incoming traffic on UDP port 520 (RIP) from specified countries by a geo-IP on a FortiGate using a local-in policy. |
| Scope | FortiGate. |
| Solution | To create Geo-based address objects, go to 'Policy and Object' and select 'Addresses'. Choose to create a new address object to define the IP ranges for the specific country to block.
config firewall address
  Add Geo-based address objects in an address group:
config firewall addrgrp next
  Create a service with the required port, or edit the current service RIP. Set the category to 'General', and the UDP port range to 520.
config firewall service custom
Create a local-in policy with interface set to 'any', the source address to 'Geo_block', the destination address to 'all', the service to 'RIP', the schedule to 'always', and the action to 'deny'.
To permit RIP traffic (UDP port 520) only from a specific source while blocking all other addresses, enable source address negation. Specify the allowed IP in the srcaddr field rather than creating a list of blocked addresses. With source address negation enabled, the firewall automatically denies traffic from all sources except the one explicitly defined in the policy.
config firewall local-in-policy |



