Sometimes you need an easy way to redirect incoming connections to another system. For example when migrating an old box to a new one. redir: Redirect TCP connections It can run under inetd or stand alone (in which case it handles multiple connections). Its 8 bit clean, not limited to line mode, is small and light. Supports FTP redirects and supports transparency support. redir is all you need to redirect traffic across firewalls authenticate based on an IP address etc 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.)
You’ll need the ‘redir’ program for this to work:
apt-get install redir
Redir redirects tcp connections coming in to a local port to a specified address/port combination.
To redirect TCP connections with redir utility, Simply type the
command such as below
Suppose that the ip address of our system is 188.8.131.52 and we woud like to connect to 184.108.40.206 ip address and 3120 port over our system. Simply, we want redirutiliy to redirect connections coming to 220.127.116.11 on port 3120 to 18.104.22.168 port 3120. We have to run redir such as below to do so: