In this tutorial we’ll install the Debian Linux 9 (squeeze), Apache 2 with mpm-itk (to run each web as a isolated user),...
Configuring port forwarding with rinetdÁstþór IP
inetd redirects TCP connections from one IP address and port to another. rinetd is a single-process server which handles any number of connections to the address/port pairs specified in the file /etc/rinetd.conf. Since rinetd runs as a single process using nonblocking I/O, it is able to redirect a large number of connections without a severe impact on the machine. This makes it practical to run TCP services on machines inside an IP masquerading firewall.
1. Install rinetd
apt-get install rinetd
2. Add some forwarding rules (pico /etc/rinetd.conf)
# bindadress bindport connectaddress connectport
0.0.0.0 80 188.8.131.52 80 # HTTP
0.0.0.0 110 184.108.40.206 110 # POP3
0.0.0.0 143 220.127.116.11 143 # IMAP
These rules will forward all http, pop3 and imap connections to Google’s web, pop3 and imap servers. It’s just an example but it may make more sense to forward for example port 80 on a public IP address to the internal network to a server that does not have a public IP address.
3. Restart rinetd
Now enter http://youserver in a web browser and you’ll see Google search.