User Tools

Site Tools


redirect_traffic

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

redirect_traffic [2017/03/23 09:22] (current)
Line 1: Line 1:
 +====== Redirecting your filtered IP ======
  
 +Sometimes it's not possible to use a GRE tunnel because you don't have root access over your destination server, running a Windows based server or simply don't want to go through the possible headache of it.
 +
 +This guide will show you how to still redirect traffic from your filtered IP to a destination server.
 +
 +**NOTE #1** - Please realize that you will **not** see the users real IP when they connect with this method.
 +Alas, it's a shortcoming you'll have to live with until you're able to setup a proper tunnel.
 +
 +**NOTE #2** - This method only supports TCP ports.
 +===== Supported Operating Systems ====
 +
 +All operating systems are supported since there'​s no configuring required on the destination server. Please remember if you're redirecting traffic to a residential connection, you'll probably have to forward ports on your home router.
 +
 +===== Prerequisites =====
 +
 +   * A EidolonHost VPS running linux. Any plan will do.
 +   * The destination servers IP
 +   * The source & destination **TCP** port you with to forward to<​->​from
 +   * A EidolonHost filtered IP ($3.00/m per IP. 209.141.38.x & 209.141.39.x are the current filtered subnets)
 +
 +
 +===== Setup =====
 +
 +You'll need to install redir.
 +
 +On Debian/​Ubuntu:​
 +
 +<​code>​
 +apt-get install redir
 +</​code>​
 +
 +On CentOS you need to download redir from http://​pkgs.repoforge.org/​redir/​
 +Get the package that matches your version of distribution as well as architecture. As an example:
 +
 +<​code>​
 +wget http://​pkgs.repoforge.org/​redir/​redir-2.2.1-1.2.el5.rf.i386.rpm
 +rpm -i redir-2.2.1-1.2.el5.rf.i386.rpm
 +</​code>​
 +
 +
 +After that, setup is very straight forward and consists of a single command.
 +
 +<​code>​
 +redir --laddr=EidolonHost_FILTERED_IP --lport=PORT_TO_FORWARD_FROM --caddr=DESTINATION_IP --cport=DESTINATION_PORT &
 +</​code>​
 +
 +As an example:
 +
 +<​code>​
 +redir --laddr=209.141.39.10 --lport=25565 --caddr=1.2.3.4 --cport=25565 &
 +</​code>​
 +
 +
 +This will redirect the standard Minecraft port to destination 1.2.3.4
 +
 +Now just update your DNS or give your users your filtered IP and you're set.
 +
 +You may want to add the redir line to your ''/​etc/​rc.local''​ so it starts up on reboot.
redirect_traffic.txt ยท Last modified: 2017/03/23 09:22 (external edit)