Script to block IPs

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • yikester
    Registered User
    • Nov 2002
    • 49

    #1

    Script to block IPs

    Hi!
    Anybody know of a script that can block IPs receiving a 401 response from the webserver for a certain time? To slow down a DDOS...
  • Babaganoosh
    ♥♥♥ Likes Hugs ♥♥♥
    • Nov 2001
    • 15841

    #2
    .htaccess
    I like pie.

    Comment

    • yikester
      Registered User
      • Nov 2002
      • 49

      #3
      Yes. But something needs to detect that. I'm looking for a script that does this.

      A DDOS comes from a lot of IPs....

      Comment

      • uchase/webpry
        So Fucking Banned
        • Aug 2004
        • 2085

        #4
        try:

        /sbin/route add -host XXX.XXX.XXX.XXX 127.0.0.1

        Comment

        • yikester
          Registered User
          • Nov 2002
          • 49

          #5
          Come on guys... I know how to block an IP. :-)

          I'm looking for a script that watches HTTP response 401, builds a table, counts the 401s and then pulls the plug for that IP.

          Comment

          • zentz
            Confirmed User
            • Nov 2003
            • 8062

            #6
            Originally posted by Armed & Hammered
            .htaccess
            Programs that owe me money ---- Epassporte.com ~ $2700 | Protraffic.com ~ $2600 | XonDemand.com ~ $3000

            Email: [email protected]

            Comment

            • Doc911
              Confirmed User
              • Feb 2004
              • 3695

              #7
              Originally posted by yikester
              Come on guys... I know how to block an IP. :-)

              I'm looking for a script that watches HTTP response 401, builds a table, counts the 401s and then pulls the plug for that IP.
              if the http response is 401 it didn't read the script silly. so how exactly did you want to the script to run? locally parcing your log files? hows the script gonna block those ips when it never gets a chance to respond to the http request to begin with? do you have a firewall that reads configuration constantly from a text file or SQL database?


              For PHP/MySQL scripts ICQ 161480555 or email [email protected]

              Comment

              • Lane
                Will code for food...
                • Apr 2001
                • 8496

                #8
                www.proxypass.com

                Comment

                • yikester
                  Registered User
                  • Nov 2002
                  • 49

                  #9
                  I've found a solution using a custom error handler recording the failed attempts and telling the firewall what to block. But it needs to be developed furtther.

                  If anybody knows a solution ready to use, please drop a line.

                  Comment

                  • yikester
                    Registered User
                    • Nov 2002
                    • 49

                    #10
                    Originally posted by Lane
                    www.proxypass.com
                    That was a good one. Thanks!

                    Comment

                    Working...