I am trying to find a tool that will allow me to find the route a packet will take that comes in on a device, and has a particular destination address.
ip route get
will do most of what I am looking for.
The issue is that I would like to test whether packets are finding the right routes when they have a fwmark in a rather complicated routing environment.
The ideal tool would allow spoofing a generic packet with a fwmark (or other properties) and could either send it through the entire IpTables chains and the ip route / ip rule sets, or just find the route that would be returned.
I'd like to be able to run a command to verify that a particular set of routes works as intended.
Minimum requirement would be something like ip route get
but with fwmark support.
Although, at this point, any suggestions for testing utilities of routing would be greatly appreciated! It gets complicated rather quickly as the routes pile up.