21 February, 2012

[PERL] How to Setup your Anti-DDoS Script [VPS Ubuntu, Debian, Windows]

Hello,
In this tutorial i show you how to setup a perl anti ddos script,
Ok well first what you need is the Anti-DDoS Script.
I posted a nice one, to bear up against 25.000 Connections.


Link for the Thread:
[Protection] Anti-DDoS Script, over 25k connections.


Link for Putty:
-Download Putty for Windows :)
-Download Putty for Linux :)

Create the perl script !, Note: save it as .pl :).



[Installing Perl]
----~Debian~--
If you are using Debian, Perl should already be installed. If not, the required package is simply: perl
--

----~Ubuntu~--
Go to Putty and type in: sudo apt-get install perl perl-modules perl-base perl-doc
--

----~Windows~--
Windows Server, this is not so easy.

1) Open IIS 6.0

2) Click on the name of your computer -> click on "Web Service Extensions" and one can view few links.
One of them says "Add a new Web service extension...", click on that link.

3) In that window it will ask for the extension name one can put anything, like "CGI script" and under the
"Required Files" section put 'C:\Perl\bin\perl.exe "%s" %s' click OK to the notification,
click "Set status to allowed" and press ok.

4) Now, one need to go at command prompt and "md c:\inetpub\cgi-bin" [without quote].

5) Now go back to the IIS Manager and right click on Default Web Site highlight "New" in the pop-up menu
and click "Virtual Directory..." in the new menu.

6) Click next then as an alias put "cgi-bin" and click next then as a path for the next dialog put in
"c:\inetpub\cgi-bin". On the next dialog leave everything checked and checks executes and click next.

7) Click Finish to end the installation wizard.

8) Right-click on cgi-bin directory from default web sites and click on properties.

9) Click Configuration in the lower right-hand area of the dialog and make sure .pl is there (if it isn't, add it the way you see it).

To make the scripts work the line (#!/usr/bin/perl) should now be #!C:\Perl\bin\perl.exe. Any reference to any files
should be changed from /home/user etc, to c:/home/user or c:\\home\\users - note the double back-slashes.
Now, one should be able to run Perl scripts successfully using Windows Server 2003, and IIS 6.0.
--

[Add to Autostart]
----~Debian~--
Put it in /etc/rc<RUNLEVEL>.d/ in a script like:
#!/bin/bash
perl <script>
Chmod +x it and it should work.
To get your current RUNLEVEL, do a runlevel as root.
--

----~Ubuntu~--
On Ubuntu, the simplest way is to add this line to your /etc/rc.local file (before the exit 0 line, substituting username with your own user name):

Quote:su -c "./path/to/script.plstart" username &
--

-I deleted this Windows Part :I

This is all i can tell you about that, if you have more questions ask your best friend google
 

Labels:

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home