• 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.

DDoS TCP proxy set-up

YOLO <3
Joined
Jul 6, 2013
Messages
542
Reaction score
31
I'm now doing this: http://forum.ragezone.com/f335/tut-ddos-tcp-proxy-tutorial-959382/

But the last step doesn't work, the proxy won't start. These errors are the ones I get:

a44b0e04dd6e3520a5c81a53c5b06381 - DDoS TCP proxy set-up - RaGEZONE Forums


(First error is in dutch; says file or map doesn't exist)
 

Attachments

You must be registered for see attachments list
Last edited:
YOLO <3
Joined
Jul 6, 2013
Messages
542
Reaction score
31
Download the latest source version of haproxy.
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

Edit the config file then save 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
Then run this.
PHP:
service haproxy start
chkconfig haproxy on
First command doesnt work:
4fb512d2e065fb184602c7fef71de945 - DDoS TCP proxy set-up - RaGEZONE Forums




or update source list
apt-get update
apt-get install haproxy
nano/etc/haproxy/haproxy.cfg
Put your configuration
/etc/init.d/haproxy restart :)
update source list doesnt work


a83e37dab89dd1e1cd17131b0896c359 - DDoS TCP proxy set-up - RaGEZONE Forums
 

Attachments

You must be registered for see attachments list
Upvote 0
YOLO <3
Joined
Jul 6, 2013
Messages
542
Reaction score
31
PHP:
yum install wget gcc pcre-static pcre-devel -y
That command works. I'm following your other commands in your previous post but the 3rd one doesn't work:
918afd280278da05f6f35474b4e4f5f4 - DDoS TCP proxy set-up - RaGEZONE Forums
 

Attachments

You must be registered for see attachments list
Upvote 0
Unknown Place
Joined
Mar 7, 2013
Messages
580
Reaction score
87
PHP:
yum install wget gcc pcre-static pcre-devel -y


I don't use this config, it's off google since he didn't know what to do

What I said is that he is not a Linux user, so even the most basic things are a big issue for him, it would be better if he could learn that, since he needs that of course. :p
 
Upvote 0
Newbie Spellweaver
Joined
Oct 21, 2012
Messages
40
Reaction score
14
That command works. I'm following your other commands in your previous post but the 3rd one doesn't work:
918afd280278da05f6f35474b4e4f5f4 - DDoS TCP proxy set-up - RaGEZONE Forums
3rd
PHP:
cd ./haproxy-1.6.3
7th
PHP:
cp /root/haproxy-1.6.3/examples/haproxy.init /etc/init.d/haproxy
 

Attachments

You must be registered for see attachments list
Upvote 0
YOLO <3
Joined
Jul 6, 2013
Messages
542
Reaction score
31
3rd
PHP:
cd ./haproxy-1.6.3
7th
PHP:
cp /root/haproxy-1.6.3/examples/haproxy.init /etc/init.d/haproxy
Ok thanks, I'm now at the config step (vi /etc/haproxy/haproxy.cfg )

105db345491c90c0ff4176da58f68070 - DDoS TCP proxy set-up - RaGEZONE Forums


If I copy your config (and edit it with my own VPS details) I can't save it with ctrl+S?
 

Attachments

You must be registered for see attachments list
Upvote 0
Newbie Spellweaver
Joined
Oct 21, 2012
Messages
40
Reaction score
14
Ok thanks, I'm now at the config step (vi /etc/haproxy/haproxy.cfg )

105db345491c90c0ff4176da58f68070 - DDoS TCP proxy set-up - RaGEZONE Forums


If I copy your config (and edit it with my own VPS details) I can't save it with ctrl+S?

After you replace the config with the new one, Press "esc" then type
PHP:
:wq
 

Attachments

You must be registered for see attachments list
Upvote 0
YOLO <3
Joined
Jul 6, 2013
Messages
542
Reaction score
31
After you replace the config with the new one, Press "esc" then type
PHP:
:wq
dc47d82abaec5fd918fd0479f04e0d78 - DDoS TCP proxy set-up - RaGEZONE Forums

If I replace the config like this, I can't do esc or something. I can't save the file.
 

Attachments

You must be registered for see attachments list
Upvote 0
YOLO <3
Joined
Jul 6, 2013
Messages
542
Reaction score
31
It should work fine, just press esc then type this
PHP:
:wq
It should come up in the bottom left corner, then press enter
Ok works now, I tried this:
Code:
[COLOR=#0000BB]service haproxy start[/COLOR]
[COLOR=#0000BB]chkconfig haproxy on  [/COLOR]

1e5ef61744bf19ae5702689a8351798b - DDoS TCP proxy set-up - RaGEZONE Forums


Got a fail message. Also, if I go to this VPS IP:pORT it doesn't work
 

Attachments

You must be registered for see attachments list
Last edited:
Upvote 0
Newbie Spellweaver
Joined
Dec 29, 2015
Messages
36
Reaction score
3
Ok works now, I tried this:
Code:
[COLOR=#0000BB]service haproxy start[/COLOR]
[COLOR=#0000BB]chkconfig haproxy on  [/COLOR]

1e5ef61744bf19ae5702689a8351798b - DDoS TCP proxy set-up - RaGEZONE Forums


Got a fail message. Also, if I go to this VPS IP:pORT it doesn't work
Got same error, if you do 'systemctl status haproxy.service':
Code:
[root@rpi2 examples]# systemctl status haproxy.service● haproxy.service - SYSV: HA-Proxy is a TCP/HTTP reverse proxy which is particularly suited for high availability environments.
   Loaded: loaded (/etc/rc.d/init.d/haproxy)
   Active: failed (Result: exit-code) since Thu 1970-01-01 01:07:49 UTC; 1min 27s ago
     Docs: man:systemd-sysv-generator(8)


Jan 01 01:07:49 rpi2 systemd[1]: Starting SYSV: HA-Proxy is a TCP/HTTP reve.....
Jan 01 01:07:49 rpi2 haproxy[8604]: /etc/rc.d/init.d/haproxy: line 23: /etc...ry
Jan 01 01:07:49 rpi2 systemd[1]: haproxy.service: control process exited, c...=1
Jan 01 01:07:49 rpi2 systemd[1]: Failed to start SYSV: HA-Proxy is a TCP/HT.....
Jan 01 01:07:49 rpi2 systemd[1]: Unit haproxy.service entered failed state.
Jan 01 01:07:49 rpi2 systemd[1]: haproxy.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
 

Attachments

You must be registered for see attachments list
Upvote 0
YOLO <3
Joined
Jul 6, 2013
Messages
542
Reaction score
31
Got same error, if you do 'systemctl status haproxy.service':
Code:
[root@rpi2 examples]# systemctl status haproxy.service● haproxy.service - SYSV: HA-Proxy is a TCP/HTTP reverse proxy which is particularly suited for high availability environments.
   Loaded: loaded (/etc/rc.d/init.d/haproxy)
   Active: failed (Result: exit-code) since Thu 1970-01-01 01:07:49 UTC; 1min 27s ago
     Docs: man:systemd-sysv-generator(8)


Jan 01 01:07:49 rpi2 systemd[1]: Starting SYSV: HA-Proxy is a TCP/HTTP reve.....
Jan 01 01:07:49 rpi2 haproxy[8604]: /etc/rc.d/init.d/haproxy: line 23: /etc...ry
Jan 01 01:07:49 rpi2 systemd[1]: haproxy.service: control process exited, c...=1
Jan 01 01:07:49 rpi2 systemd[1]: Failed to start SYSV: HA-Proxy is a TCP/HT.....
Jan 01 01:07:49 rpi2 systemd[1]: Unit haproxy.service entered failed state.
Jan 01 01:07:49 rpi2 systemd[1]: haproxy.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
Yes same error
 
Upvote 0
Newbie Spellweaver
Joined
Oct 21, 2012
Messages
40
Reaction score
14
Got same error, if you do 'systemctl status haproxy.service':
Code:
[root@rpi2 examples]# systemctl status haproxy.service● haproxy.service - SYSV: HA-Proxy is a TCP/HTTP reverse proxy which is particularly suited for high availability environments.
   Loaded: loaded (/etc/rc.d/init.d/haproxy)
   Active: failed (Result: exit-code) since Thu 1970-01-01 01:07:49 UTC; 1min 27s ago
     Docs: man:systemd-sysv-generator(8)


Jan 01 01:07:49 rpi2 systemd[1]: Starting SYSV: HA-Proxy is a TCP/HTTP reve.....
Jan 01 01:07:49 rpi2 haproxy[8604]: /etc/rc.d/init.d/haproxy: line 23: /etc...ry
Jan 01 01:07:49 rpi2 systemd[1]: haproxy.service: control process exited, c...=1
Jan 01 01:07:49 rpi2 systemd[1]: Failed to start SYSV: HA-Proxy is a TCP/HT.....
Jan 01 01:07:49 rpi2 systemd[1]: Unit haproxy.service entered failed state.
Jan 01 01:07:49 rpi2 systemd[1]: haproxy.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

Yes same error

Reinstall centos6 and do the following

Run This
PHP:
sudo yum install wget gcc pcre-static pcre-devel -y

Download Ha-Proxy 1.6.3
PHP:
wget http://www.haproxy.org/download/1.6/src/haproxy-1.6.3.tar.gz -O ~/haproxy.tar.gz

Extract it
PHP:
tar xzvf ~/haproxy.tar.gz -C ~/

Run This
PHP:
cd ~/haproxy-1.6.3

Compile it
PHP:
make TARGET=linux2628

Now install it
PHP:
sudo make install

Run the following
PHP:
sudo cp /usr/local/sbin/haproxy /usr/sbin/
sudo cp ~/haproxy-1.6.3/examples/haproxy.init /etc/init.d/haproxy
sudo chmod 755 /etc/init.d/haproxy

Create the directories
PHP:
sudo mkdir -p /etc/haproxy
sudo mkdir -p /run/haproxy
sudo mkdir -p /var/lib/haproxy
sudo touch /var/lib/haproxy/stats

Create a User for Ha-Proxy
PHP:
sudo useradd -r haproxy

Now edit the config
PHP:
sudo 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

Now start Ha-Proxy
PHP:
service haproxy start
chkconfig haproxy on
 
Upvote 0
YOLO <3
Joined
Jul 6, 2013
Messages
542
Reaction score
31
Reinstall centos6 and do the following

Run This
PHP:
sudo yum install wget gcc pcre-static pcre-devel -y

Download Ha-Proxy 1.6.3
PHP:
wget http://www.haproxy.org/download/1.6/src/haproxy-1.6.3.tar.gz -O ~/haproxy.tar.gz

Extract it
PHP:
tar xzvf ~/haproxy.tar.gz -C ~/

Run This
PHP:
cd ~/haproxy-1.6.3

Compile it
PHP:
make TARGET=linux2628

Now install it
PHP:
sudo make install

Run the following
PHP:
sudo cp /usr/local/sbin/haproxy /usr/sbin/
sudo cp ~/haproxy-1.6.3/examples/haproxy.init /etc/init.d/haproxy
sudo chmod 755 /etc/init.d/haproxy

Create the directories
PHP:
sudo mkdir -p /etc/haproxy
sudo mkdir -p /run/haproxy
sudo mkdir -p /var/lib/haproxy
sudo touch /var/lib/haproxy/stats

Create a User for Ha-Proxy
PHP:
sudo useradd -r haproxy

Now edit the config
PHP:
sudo 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

Now start Ha-Proxy
PHP:
service haproxy start
chkconfig haproxy on
I've done everything you said but I got at the end some errors:
73bc32b9443d1f254993553ae963962c - DDoS TCP proxy set-up - RaGEZONE Forums


Also, the port does not work too.
 

Attachments

You must be registered for see attachments list
Upvote 0
Newbie Spellweaver
Joined
Oct 21, 2012
Messages
40
Reaction score
14
I've done everything you said but I got at the end some errors:
73bc32b9443d1f254993553ae963962c - DDoS TCP proxy set-up - RaGEZONE Forums


Also, the port does not work too.

Have a look at the first error "bal"
Go into the config file and on line 1 it will be there, change it to "global"
 

Attachments

You must be registered for see attachments list
Upvote 0
YOLO <3
Joined
Jul 6, 2013
Messages
542
Reaction score
31
Have a look at the first error "bal"
Go into the config file and on line 1 it will be there, change it to "global"
82cc50ba5d17fc4be5c7ec57d869ca35 - DDoS TCP proxy set-up - RaGEZONE Forums

All commands work now, except the last ones.
 

Attachments

You must be registered for see attachments list
Upvote 0
Back
Top