Skip to main content
abbio90
New Member
May 5, 2024
Question

STATIC Public IP /32

  • May 5, 2024
  • 3 replies
  • 2530 views

Good morning, I have a public ip 1.2.3.4/255.255.255.255 with gateway 192.168.80.1 if I set ip on the interface in /32 and create a route with dst 0.0.0.0/0.0.0.0 gw 192.168.80.1 doesn't work. Maybe because the connected route to reach 192.168.80.1 is not created, how should I configure it? If I set the same directly on a PC it works

3 replies

ndumaj
Staff
Staff
May 5, 2024

Dear @abbio90
Where is the GW 192.168.80.1 set?
Where did you set the Public IP?
What is the FGT firmware version in place?

BR

abbio90
abbio90Author
New Member
May 5, 2024

the gateway is set as static default route. I enter the public IP in the interface itself. the version is 5.2.15

ndumaj
Staff
Staff
May 5, 2024

Hello @abbio90 
FGT 5.2.15 quite old :)
Then check the routing part on FW:
get router info routing-table all

Going to to Router > Static > Static Routes.
Create a route external  --> share the error.

Check the handbook:
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/ad42e5fa-1a0f-11e9-9685-f8bc1258b856/fortios-handbook-5212.pdf

also CLI refrence:
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/27300d29-1a11-11e9-9685-f8bc1258b856/fortigate-cli-52.pdf

BR

dbu
Staff
Staff
May 5, 2024

Hi @abbio90 , 
Your public IP should be on same network with the ISP IP. 

1.2.3.4/32 and 192.168.80.1 gateway have nothing in common.
Maybe i missing something here. 

Regarding the static route you can set like this from GUI :

static.PNG

 

Or from CLI :
config router static
edit 1
set gateway 10.191.31.111
set device "port1"
next
end

 



alwis
Staff
Staff
May 5, 2024

Dear @abbio90 

 

If you set your subnet to be /32 on the interface, i don't think its possible to create a static

route on fortigate since it was /32 and the only available ip is the 1.2.3.4 only since it was /32. Further more the ip set on interface and the gateway was not in any of the interface on your environment.

You mentioned you set on PC it works, are you configure it on network adapter?, can you show us how you configure it?

 

Regards

Alwis