If you normally send tcpreplay of a pcap through an interface say eth0 , the packets are outbound, ie will go out through the network card . Is there any way i can make the pcaps inbound so that my system should process it as an inbound packet?
Possible Scenario
I have an application that receives packet from eth0, extract some details from the packet and sends it through eth1. Now the situation is fine if the network is setup and real packets actually flow in to my system. But for testing purposes , i do not have anything connected to my eth0 or eth1 ports , but i still want to create similar kind of traffic from a pcap(probably through a script ) so that i dont have to depend on an external physical network connection for testing the application.
Replace eth0
with lo
lo
and sends packets to eth1
lo
every packet send to lo
will be received by lo
again, so your application will receive packets from your packet generator.
if your lo
is busy with other packets, you can add more loopback device by kernel argument max_loop=x
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With