Friday, February 22, 2019

[Linux] Why cannot receive packets from source not in my routing table?

So, these are the two experiments I did:

  • Use the default gateway provided by my router.
  • Did a tracepath -n 8.8.8.8
  • Got the expected result of the hops answering

And then I decided to do the following:

  • Remove the default gateway.
  • Add static route to 8.8.8.8 through the gateway.
  • Ping to 8.8.8.8 works
  • tracepath shows only the first hop and nothing else.
  • wireshark shows that I receive icmp packets with TTL expired messages, but apparently they are ignored somewhere along the chains.

So my question is, what is dropping these packets and why is this behaviour like that. My (very possibly flawed) common sense dictates that the application should receive the packets even though it cannot send to those destinations.

Thanks :)



No comments:

Post a Comment