I am trying to send packets using TCP replay. The file was captured in another network and contains UDP packets. In order to replay, I've changed the src and destination address, etc...using the following command:
tcprewrite --infile=original.cap --outfile=changed.cap --srcipmap=0.0.0.0/0:<MY HOST IP>/32 --dstipmap=0.0.0.0/0:<MY HOST IP>/32 --enet-dmac=<enp0s25 mac addr> --enet-smac=<enp0s25 mac addr> --fixcsum
After changing the packets, I've tried to replay using tcpreplay:
sudo tcpreplay --intf1=enp0s25 changed.cap
tcpdump shows that packets were rewrited and apprently ok:
[root@localhost ~]# tcpdump -i enp0s25 udp port 6302
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on enp0s25, link-type EN10MB (Ethernet), capture size 262144 bytes
09:31:56.758809 IP localhost.localdomain.qb-db-server > localhost.localdomain.6302: UDP, length 673
09:31:56.758836 IP localhost.localdomain.12608 > localhost.localdomain.6302: UDP, length 669
09:31:56.758845 IP localhost.localdomain.13024 > localhost.localdomain.6302: UDP, length 671
09:31:56.758967 IP localhost.localdomain.11584 > localhost.localdomain.6302: UDP, length 666
....
However, if I launch netcat to listen on port 0.0.0.0:6302, I can't see any traffic!
Any idea what's wrong?