How To Install netsniff-ng on Debian 11

In this tutorial we learn how to install netsniff-ng on Debian 11. netsniff-ng is Linux network packet sniffer toolkit

Introduction

In this tutorial we learn how to install netsniff-ng on Debian 11.

What is netsniff-ng

netsniff-ng is:

netsniff-ng is a high performance Linux network sniffer for packet inspection. It can be used for protocol analysis, reverse engineering or network debugging. The gain of performance is reached by ‘zero-copy’ mechanisms, so that the kernel does not need to copy packets from kernelspace to userspace.

netsniff-ng toolkit currently consists of the following utilities:

  • netsniff-ng: a zero-copy packet analyzer, pcap capturing/replaying tool
  • trafgen: a multithreaded low-level zero-copy network packet generator
  • mausezahn: high-level packet generator for appliances with Cisco-CLI
  • ifpps: a top-like kernel networking and system statistics tool
  • curvetun: a lightweight curve25519-based multiuser IP tunnel
  • astraceroute: an autonomous system trace route and DPI testing utility
  • flowtop: a top-like netfilter connection tracking tool
  • bpfc: a [seccomp-]BPF (Berkeley packet filter) compiler, JIT disassembler

There are three methods to install netsniff-ng on Debian 11. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install netsniff-ng Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install netsniff-ng using apt-get by running the following command:

sudo apt-get -y install netsniff-ng

Install netsniff-ng Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install netsniff-ng using apt by running the following command:

sudo apt -y install netsniff-ng

Install netsniff-ng Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Debian. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install netsniff-ng using aptitude by running the following command:

sudo aptitude -y install netsniff-ng

How To Uninstall netsniff-ng on Debian 11

To uninstall only the netsniff-ng package we can use the following command:

sudo apt-get remove netsniff-ng

Uninstall netsniff-ng And Its Dependencies

To uninstall netsniff-ng and its dependencies that are no longer needed by Debian 11, we can use the command below:

sudo apt-get -y autoremove netsniff-ng

Remove netsniff-ng Configurations and Data

To remove netsniff-ng configuration and data from Debian 11 we can use the following command:

sudo apt-get -y purge netsniff-ng

Remove netsniff-ng configuration, data, and all of its dependencies

We can use the following command to remove netsniff-ng configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge netsniff-ng

Dependencies

netsniff-ng have the following dependencies:

References

Summary

In this tutorial we learn how to install netsniff-ng package on Debian 11 using different package management tools: apt, apt-get and aptitude.