How To Install nufw on Debian 9

In this tutorial we learn how to install nufw on Debian 9. nufw is authenticating firewall [NFQUEUE daemon]

Introduction

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

What is nufw

nufw is:

NuFW is an authenticating firewall based on netfilter’s NFQUEUE target. It allows one to write filtering rules based on user identity, in addition to classical network criteria. Unless other solutions, NuFW uses a strict security model and can apply different access rules to users connected on the same host, for example.

NuFW can:

  • Act as a traditional firewall
  • Add user identity to the list of parameters used to write firewall rules
  • Authenticate any connection or protocol
  • Perform accounting, routing and quality of service based on users
  • Filter packets with criteria such as application and OS
  • Log all traffic in SQL with username and application information
  • Be the key of a secure and simple Single Sign On system.

This package provides the daemon receiving packets through the NFQUEUE netfilter rule. Information about those packets are forwarded to the nuauth daemon, which decides if packets should be accepted or denied, sends back the information to Nufw that applies decisions.

There are three methods to install nufw 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 nufw Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install nufw

Install nufw Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install nufw

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

sudo aptitude -y install nufw

How To Uninstall nufw on Debian 9

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

sudo apt-get remove nufw

Uninstall nufw And Its Dependencies

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

sudo apt-get -y autoremove nufw

Remove nufw Configurations and Data

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

sudo apt-get -y purge nufw

Remove nufw configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge nufw

Dependencies

nufw have the following dependencies:

References

Summary

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