n3s0 || journal

FortiGate: Creating Static Routes Using CLI

Posted on 1 min

Networking

Some notes for the creation of Static Routes on FortiGate firewalls in FortiOS CLI.

Below creates a static route for the 172.16.128.0/24 that’s attached from the lab-vpn.

config router static
  edit 2
    set dst 172.16.128.0/24
    set device "lab-vpn"
  next
end

Create a blackhole route.

config router static
  edit 3
    set dst 172.16.128.0/24
    set device "lab-vpn"
    set distance 50
    set blackhole enable
    set vrf 0
  next
end