This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

can’t run tcprewrite on 2 specific address - unable to parse as valid CIDR

0

tcprewrite -N --pnat=10.0.0.39/32:10.0.0.39/32,192.168.1.1/32:192.168.1.1/32 -i ./upload.pcap -o ./upload_ip1.pcap

and I get: Unable to parse as a vaild CIDR: --pnat=10.0.0.39

asked 11 Sep '17, 03:02

kdani's gravatar image

kdani
26559
accept rate: 0%

Note that tcprewrite doesn't come from the Wireshark developers; it's from these people.

(11 Sep '17, 22:49) Guy Harris ♦♦

One Answer:

1

The parameter "-N" and "--pnat=" are the same (just long and short version). Therefore just specify one of them, e.g.

tcprewrite -N 10.0.0.39/32:10.0.0.39/32,192.168.1.1/32:192.168.1.1/32 -i ./upload.pcap -o ./upload_ip1.pcap

answered 11 Sep '17, 04:54

Uli's gravatar image

Uli
9031515
accept rate: 29%

actually - the right answer would be to use only 1 pair - this code replace the ip with itself - but you are correct about using both -n and --pnat

(11 Sep '17, 23:39) kdani