Rinetd is a daemon program for redirecting TCP connections.
It is a single-process server that handles any number of connections to the address/port pairs specified in /etc/rinetd.conf
Because rinetd runs as a single process using non-blocking I/O, it is capable of redirecting a large number of connections without severely affecting the machine
This makes it practical to run services on machines inside the IP firewall.
Let's start the installation.
sudo apt update sudo apt install rinetd
Now create a configuration file for rinetd, using the nano editor:
At the end of the document we need to add lines:
220.127.116.11 12341 192.168.1.5 1234 18.104.22.168 12342 192.168.1.6 1234 22.214.171.124 12343 192.168.1.7 1234 126.96.36.199 12344 192.168.1.8 1234 188.8.131.52 12345 192.168.1.9 1234
- 1st column - IP listened to by rinetd
- 2nd column - port listened to by rinetd
- 3rd column - IP to which we redirect traffic
- 4th column - port to which we redirect traffic from the port from the second column.
The values should be inserted without brackets and with spaces. For each connection you must add a different line, in order.
Next, we will restart the service:
service rinetd restart
This completes the configuration.