Hot!Fortigate replies to ICMP even though the best route is out another interface.

Author
Radu_sec
New Member
  • Total Posts : 2
  • Scores: 0
  • Reward points: 0
  • Joined: 2019/12/18 00:55:49
  • Status: offline
2019/12/23 23:28:17 (permalink)
0

Fortigate replies to ICMP even though the best route is out another interface.

Hello guys,
 
This is my first post here and wanted to clarify something in my head about the way Fortigate processes traffic. 
I have the following topology.   R1 ---- FGT ----R2 + this configuration:
 
-R1 and R2 both have 9.9.9.9/32 configured as Loopback interfaces.
-FGT has 1.1.1.1/32 configured as Loopback interface
-R1 has static route towards 1.1.1.1 via FGT
-R2 has default route via FGT
-FGT has default route via R1 and static route to 9.9.9.9 via R2.
 
If I try to ping 1.1.1.1, it works from both R1 and R2. I find that odd, given the fact that the best route towards 9.9.9.9 is via R2.
The only thing I could think is regarding the fact that when pinging from R1 (the one that should not work from my point of view), the FGT because it has loose RPF configured, it allows the traffic on that port and then when replying it does not consult the routing table and rather it sends the reply via the interface it received it. Can I have a confirmation about this behavior?
 
BR,
Radu
 
 
 
#1

2 Replies Related Threads

    emnoc
    Expert Member
    • Total Posts : 5546
    • Scores: 357
    • Reward points: 0
    • Joined: 2008/03/20 13:30:33
    • Location: AUSTIN TX AREA
    • Status: offline
    Re: Fortigate replies to ICMP even though the best route is out another interface. 2019/12/24 02:05:12 (permalink)
    0
    That would be my guess also but why are you using the same 9.9.9.9/32 on r1 & r2? Instead of writing this out, can you provide the route table
     
    i.e
    get router info routing-table all
     
    Also, I believe regardless of more specific routes, if you ping an interface address and it has a route, that echo-reply will be sourced with the address of the echo-request destination address.
     
     
     

    PCNSE 
    NSE 
    StrongSwan  
    #2
    lobstercreed
    Gold Member
    • Total Posts : 162
    • Scores: 21
    • Reward points: 0
    • Joined: 2018/11/28 14:57:58
    • Location: Sedalia, MO
    • Status: offline
    Re: Fortigate replies to ICMP even though the best route is out another interface. 2020/02/25 08:48:10 (permalink)
    0
    This makes perfect sense to me.  The firewall RPF check just makes sure it can route back out on the same interface.  Since 9.9.9.9 falls within 0.0.0.0/0 route towards R1, of course it works.  And since it also falls within 9.9.9.9/32 route towards R2, that one works as well. 
     
    What *wouldn't* would is trying to ping 1.1.1.1 from R2 using a source address that makes the FGT match the default route toward R1.  Then the RPF check fails and you don't receive the reply.
    #3
    Jump to:
    © 2020 APG vNext Commercial Version 5.5