How To Install hping3 on Debian 9

In this tutorial we learn how to install hping3 on Debian 9. hping3 is Active Network Smashing Tool

Introduction

In this tutorial we learn how to install hping3 on Debian 9.

What is hping3

hping3 is:

hping3 is a network tool able to send custom ICMP/UDP/TCP packets and to display target replies like ping does with ICMP replies. It handles fragmentation and arbitrary packet body and size, and can be used to transfer files under supported protocols. Using hping3, you can test firewall rules, perform (spoofed) port scanning, test network performance using different protocols, do path MTU discovery, perform traceroute-like actions under different protocols, fingerprint remote operating systems, audit TCP/IP stacks, etc. hping3 is scriptable using the Tcl language.

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

Install hping3 Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install hping3

Install hping3 Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install hping3 using apt by running the following command:

sudo apt -y install hping3

Install hping3 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 hping3 using aptitude by running the following command:

sudo aptitude -y install hping3

How To Uninstall hping3 on Debian 9

To uninstall only the hping3 package we can use the following command:

sudo apt-get remove hping3

Uninstall hping3 And Its Dependencies

To uninstall hping3 and its dependencies that are no longer needed by Debian 9, we can use the command below:

sudo apt-get -y autoremove hping3

Remove hping3 Configurations and Data

To remove hping3 configuration and data from Debian 9 we can use the following command:

sudo apt-get -y purge hping3

Remove hping3 configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge hping3

Dependencies

hping3 have the following dependencies:

References

Summary

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