How to add static route point to PPPoE interface on Fortigate with WAN failover

How to add static route point to PPPoE interface on Fortigate with WAN failover

When an interface has some form of changing IP address (DDNS, PPPoE, or DHCP assigned address), routing needs special attention. The standard static route cannot handle the changing IP address. The solution is to use the dynamic-gateway command in the CLI. Say for example you already have four static routes, and you have a PPPoE connection over the wan2 interface and you want to use that as your default route.

The route is configured on the dynamic address VPN peer trying to access the static address FortiGate unit.

If you want to create static route on PPPoE on WAN 1 or WAN 2 and you have failover (Load balancing with FG) you need this command to Configure dynamic gateway routing via CLI on fortigate unit:

config router static edit 5 set dynamic-gateway enable end

*You cant do dynamic-gateway via GUI – its only available in CLI.

After the change you dont need to reboot your unit.

This is example of static route on WAN1 and WAN2 (PPPOE with dynamic-gateway)