• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

[TUT] How to setup a DDoS TCP proxy [Linux]

YOLO <3
Joined
Jul 6, 2013
Messages
542
Reaction score
31
The old thread: http://forum.ragezone.com/f335/tut-ddos-tcp-proxy-tutorial-959382/
As it has been closed and haproxy has been updated, it's time for a new tutorial.

You need:
- Putty
- Haproxy
- CentOS 6+
- Linux VPS (protected for example OVH)

Follow all these commands:
PHP:
wget http://www.haproxy.org/download/1.6/src/haproxy-1.6.3.tar.gz

PHP:
tar xvzf haproxy-1.6.3.tar.gz

PHP:
cd ./haproxy-1.4.24

PHP:
make TARGET=linux2628 ARCH=native

PHP:
make install

PHP:
cp /usr/local/sbin/haproxy /usr/sbin/

PHP:
cp /root/haproxy-1.4.24/examples/haproxy.init /etc/init.d/haproxy

PHP:
chmod 755 /etc/init.d/haproxy

PHP:
useradd --system haproxy

PHP:
mkdir -p /etc/haproxy

Copy this in the config and change it:
PHP:
vi /etc/haproxy/haproxy.cfg
PHP:
global
   log /dev/log local0
   log /dev/log local1 notice
   chroot /var/lib/haproxy
   stats socket /run/haproxy/admin.sock mode 660 level admin
   stats timeout 30s
   user haproxy
   group haproxy
   daemon

defaults
   log global
   mode tcp
   option dontlognull
   timeout connect 5000
   timeout client 50000
   timeout server 50000

frontend tcp_front
   bind PROTECTED_IP:PROTECTED_PORT
   default_backend tcp_back

backend tcp_back
   balance roundrobin
   server server1 VPS_IP:VPS_PORT check

VPS IP must be for example your hotels VPS IP, protected IP the Linux server.

PHP:
service haproxy start
chkconfig haproxy on

Credits to Hayd3n!
 
Last edited:
Experienced Elementalist
Joined
Feb 5, 2012
Messages
259
Reaction score
93
An Easier way is to do the following

Yum install nano

yum install haproxy

nano /etc/haproxy/haproxy.cfg

* Add the config that is in this thread and save it.

then command the service to start by saying service start haproxy
 
Last edited:
YOLO <3
Joined
Jul 6, 2013
Messages
542
Reaction score
31
An Easier way is to do the following

Yum install nano

yum install haproxy

nano /etc/haproxy/haproxy.cfg

* Add the config that is in this thread and save it.

then command the service to start by saying service start haproxy
No, that won't work.
 
Experienced Elementalist
Joined
Feb 5, 2012
Messages
259
Reaction score
93
Well, I tried the same as you said on my OVH Centos 6 server but it didn't work. Where is your VPS hosted?

Blazingfast. Although this works, the only difference that would be between hosts is if they set up their servers without allowing all ports to automaticly be open, and it that case you'd have to manualy open it through your panel.
 
YOLO <3
Joined
Jul 6, 2013
Messages
542
Reaction score
31
Blazingfast. Although this works, the only difference that would be between hosts is if they set up their servers without allowing all ports to automaticly be open, and it that case you'd have to manualy open it through your panel.
Yeah they are probably not open at OVH
 
Newbie Spellweaver
Joined
Jan 27, 2012
Messages
27
Reaction score
15
we all know that OVH isn't the best, but still better then nothing.
Fair enough, however I have seen QuadraNet's VEST do a better job than OVH - and they just use some rubbish Radware firewalls. Plenty of providers using slightly better hosts on a similar or just slightly more expensive price range.

It's an example, you have to choice yourself. What do you recommend?
KMS-Hosting.de or RamNode.
 
Back
Top