fping icon indicating copy to clipboard operation
fping copied to clipboard

New option for "outgoing interface"

Open schweikert opened this issue 11 years ago • 1 comments

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.

schweikert avatar Apr 17 '14 06:04 schweikert

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).

logan2211 avatar Sep 10 '19 04:09 logan2211