redirect ports to remote


To redirect traffic from one port, you can either use iptables PREROUTING or – if need be only tcp – also rinted.

Rinetd has the advantage that the setup is simpler.

You only have to adjust the settings in /etc/rinetd.conf.

To redirect. http and https:

#source port destination port
176.9.24.113 http 78.46.84.243 http
176.9.24.113 https 78.46.84.243 https

This sends the traffic from port 80 and 443 from 176.9.24.113 to 78.46.84.24.

Before you can start rinetd on the source-server, you must stop apache as a double binding to a port is not possible.

/etc/init.d/apache2 stop

Now we can start rinetd

/etc/init.d/rinetd start


by now the traffic is redirected.

It does not replace any failover-ip, because the server must continue constant, but for smaller jobs (eg the filesystem) it´s quite practical.

Leave a comment

Your email address will not be published. Required fields are marked *