1

I'm using tcpreplay and tcprewrite in openwrt.

And I want to resend captured packet to another node.

Bellow is my description.

     External                        OpenWRT                     Computer1
                           eth0               wlan0       
  119.207.66.08 -----> 192.168.0.180       192.168.4.1 ------>  192.168.4.110  

I captured packets from external using tcpdump.

tcpdump -i any -d 192.168.0.180 -w save_packet.pcap

And I tried rewriting packet's source IP and source MAC, destination IP and destination MAC.

tcprewrite -i save_packet.pcap -o rewrite_packet.pcap --enet-smac=[OpenWRT's MAC] \
--enet-dmac=[Computer1's MAC] -S 0.0.0.0/0:192.168.4.1 -D 192.168.0.180:192.168.4.110 -C

And replayed rewrite_packet.pcap

tcpreplay -i wlan0 rewrite_packet.pcap

Up to this, I received rewrite_packet in Computer1. and Computer1 did response about this packet.

but not to External(119.207.66.08) but to OpenWRT(192.168.0.180)... I want Computer1 response to External. But when I don't change Source IP, MAC, I cannot send to Computer1.119.207.66.08 please help me...

YoonPD
  • 11
  • 2

0 Answers0