fping
fping copied to clipboard
New option for "outgoing interface"
I am not sure that this is possible, but it would be useful to be able to specify a "outgoing interface". This would work similarly to the '-I' option, but would only affect the "ICMP ECHO REQUEST" packets and would allow for the "REPLY" to be coming from a different interface.
This can be accomplished easily once https://github.com/schweikert/fping/issues/158 is added
echo '500 alt_interface' >> /etc/iproute2/rt_tables
ip route add default dev alt_interface table alt_interface
ip rule add fwmark 500 lookup alt_interface
fping --mark 500 1.1.1.1
Will send packets using alt_interface and accept replies a different incoming interface (depending on rp_filter settings).