Peeps, it's been a long time that unfortunately, I've not updated any contents into my blog. Things have been really going different since a couple of months thus I couldn't figure out any free time out of my crazy schedules. And then got occupied with some WannaCry stuffs. Anyways finally I am back with some more contents and this time I have some good buffer time with me. Hopefully, you should be seeing some more frequent updates going forward. At the same time, I am planning to launch my own YouTube channel for which I am preparing some interesting contents. Looking forward to launching it soon! Hope you like them.

Now coming back to the business. Today I would be sharing the easy steps on how you can perform tcpreplay installation (on Linux) from its source package in-stead of relying on apt-get method as that would not install the latest version for you which got many more fixes and security patches.

To give you an idea about the tool before we start, tcpreplay is a pcap replay tool which got many awesome features. A few mention out of all enormous features, you can modify PCAP parameters on the fly before performing packet replays as per your network setup environment, perform quick replays and much more. The list would go on and on. The latest version of tcpreplay got many security fixes, patches thus making it more stable than the earlier builds.

The older version of tcpreplay (around ~3.x) had many issues to replay a bunch of pcaps and that was a time when I had to perform a large scale automation. That's when I realized that tcpreplay v3.x is not enough to get the things done as many of the packet captures were not replayed successfully even though the packets were looking absolutely fine at the first place. And once I upgraded to the 4.2.x version (mine is v4.2.4 by the time of this blog post), all those replay errors were simply gone. So if you try to install tcpreplay via aptitude on Ubuntu (my preferred OS), better you avoid that and follow the source installation in-stead. I would explain the process on how to do it the easier way. Let's get started.

## Install development libraries:

$sudo apt-get install -y libdumbnet-dev libpcap-dev libnet1 libnet1-dev$sudo updatedb && sudo ldconfig


$sudo apt-get update$cd /tmp
$wget -c "https://downloads.sourceforge.net/project/tcpreplay/tcpreplay/4.2.6/tcpreplay-4.2.6.tar.gz?r=https%3A%2F%2Fsourceforge.net%2Fprojects%2Ftcpreplay%2F&ts=1495545608&use_mirror=excellmedia" -O "tcpreplay_426.tar.gz"$tar -zxvf tcpreplay_426.tar.gz


## Compile and install:

$cd /tmp/tcpreplay_426$./configure && make && sudo make install


\$tcpreplay -V


You should be getting the verbose details of your tcpreplay instance along with the linked libdnet and libpcap version details.

Thats all!

Have fun. Cheers!