How To Install redir on Ubuntu 18.04

In this tutorial we learn how to install redir on Ubuntu 18.04. redir is Redirect TCP connections

Introduction

In this tutorial we learn how to install redir on Ubuntu 18.04.

What is redir

redir is:

It can run under inetd or stand alone (in which case it handles multiple connections). It is 8 bit clean, not limited to line mode, is small and light. Supports transparency, FTP redirects, http proxying, NAT and bandwidth limiting.

redir is all you need to redirect traffic across firewalls that authenticate based on an IP address etc. No need for the firewall toolkit. The functionality of inetd/tcpd and “redir” will allow you to do everything you need without screwy telnet/ftp etc gateways. (I assume you are running IP Masquerading of course.)

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

Install redir Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install redir

Install redir Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install redir

Install redir 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 Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

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

sudo aptitude -y install redir

How To Uninstall redir on Ubuntu 18.04

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

sudo apt-get remove redir

Uninstall redir And Its Dependencies

To uninstall redir and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove redir

Remove redir Configurations and Data

To remove redir configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge redir

Remove redir configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge redir

References

Summary

In this tutorial we learn how to install redir package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.