Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
How can I block curl requests
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  Messages 26 - 50 of 68 - Collapse all  -  Translate all to Translated (View all originals) < Older  Newer >
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Joshua Smith  
View profile  
 More options Aug 3 2012, 9:15 am
From: Joshua Smith <JoshuaESm...@charter.net>
Date: Fri, 3 Aug 2012 09:15:13 -0400
Local: Fri, Aug 3 2012 9:15 am
Subject: Re: [google-appengine] How can I block curl requests

What might be helpful would be:

1. Add some logging. Up top:

import logging

then in the __call__ method:

    def __call__(self, environ, start_response):
        logging.info('__call__ sees UA: "%s"', environ['HTTP_USER_AGENT'])
        if environ['HTTP_USER_AGENT'].startswith('curl'):

2. Deploy that

3. Check your logs. If you are being hit with lots of inbound curl calls, you should get some clues right away. But you can also try hitting it with curl yourself.

On Aug 2, 2012, at 8:39 PM, Kate <mss.ka...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kyle Finley  
View profile  
 More options Aug 3 2012, 10:34 am
From: Kyle Finley <kylefin...@gmail.com>
Date: Fri, 3 Aug 2012 07:34:11 -0700 (PDT)
Local: Fri, Aug 3 2012 10:34 am
Subject: Re: [google-appengine] How can I block curl requests

Hi Joshua,

Thank you, that's a good thought.

Kate sent me some files offline, and I believe we've figured out the
problem. For the middleware to work you must be using WSGI not CGI. Someone
please correct me if I'm wrong, but I believe she would have to upgrade
here App to python27 to use it. The alternative is to do the check in the
webapp request handler:

def check_for_curl(self):
    if self.request.environ['HTTP_USER_AGENT'].startswith('curl'):
        return self.error(401)

class MainHandler(webapp.RequestHandler):
    def get(self):
        check_for_curl(self)
        # handle request

The problem is that webapp doesn't recognize error code 429 so we have to
use something else. Unless there's a simple way to make it write 429?

- Kyle


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joshua Smith  
View profile  
 More options Aug 3 2012, 10:51 am
From: Joshua Smith <JoshuaESm...@charter.net>
Date: Fri, 3 Aug 2012 10:51:23 -0400
Local: Fri, Aug 3 2012 10:51 am
Subject: Re: [google-appengine] How can I block curl requests

There are couple problems with your snippet.

First, she's getting HEAD not GET requests, so you need to use different handler.

Also, you aren't returning, so if you were in a GET request, it would proceed to handle the request regardless.

Something more like this (untested):

class MainHandler(webapp.RequestHandler):
  def head(self):
    self.error(401)

  def get(self):
    if (self.request.headers['User-Agent'].startswith('curl'))
      self.error(401)
      return
    # rest of the get handler

On Aug 3, 2012, at 10:34 AM, Kyle Finley <kylefin...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kyle Finley  
View profile  
 More options Aug 3 2012, 11:02 am
From: Kyle Finley <kylefin...@gmail.com>
Date: Fri, 3 Aug 2012 10:02:26 -0500
Local: Fri, Aug 3 2012 11:02 am
Subject: Re: [google-appengine] How can I block curl requests

Yes, thank you.  Do you have any thoughts on how to return error code 429?

On Aug 3, 2012, at 9:51 AM, Joshua Smith wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Drake  
View profile  
 More options Aug 3 2012, 11:36 am
From: "Drake" <drak...@digerat.com>
Date: Fri, 3 Aug 2012 08:36:05 -0700
Local: Fri, Aug 3 2012 11:36 am
Subject: RE: [google-appengine] How can I block curl requests

I think you change 401 in this code to 429

From: google-appengine@googlegroups.com
[mailto:google-appengine@googlegroups.com] On Behalf Of Kyle Finley
Sent: Friday, August 03, 2012 8:02 AM
To: google-appengine@googlegroups.com
Subject: Re: [google-appengine] How can I block curl requests

Yes, thank you.  Do you have any thoughts on how to return error code 429?

On Aug 3, 2012, at 9:51 AM, Joshua Smith wrote:

There are couple problems with your snippet.

First, she's getting HEAD not GET requests, so you need to use different
handler.

Also, you aren't returning, so if you were in a GET request, it would
proceed to handle the request regardless.

Something more like this (untested):

class MainHandler(webapp.RequestHandler):

  def head(self):

    self.error(401)

  def get(self):

    if (self.request.headers['User-Agent'].startswith('curl'))

      self.error(401)

      return

    # rest of the get handler

On Aug 3, 2012, at 10:34 AM, Kyle Finley <kylefin...@gmail.com> wrote:

Hi Joshua,

Thank you, that's a good thought.

Kate sent me some files offline, and I believe we've figured out the
problem. For the middleware to work you must be using WSGI not CGI. Someone
please correct me if I'm wrong, but I believe she would have to upgrade here
App to python27 to use it. The alternative is to do the check in the webapp
request handler:

def check_for_curl(self):

    if self.request.environ['HTTP_USER_AGENT'].startswith('curl'):

        return self.error(401)

class MainHandler(webapp.RequestHandler):

    def get(self):

        check_for_curl(self)

        # handle request

The problem is that webapp doesn't recognize error code 429 so we have to
use something else. Unless there's a simple way to make it write 429?

- Kyle

--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-appengine/-/TQuZYYR0wrAJ.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to
google-appengine+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.

--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to
google-appengine+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.

--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to
google-appengine+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kyle Finley  
View profile  
 More options Aug 3 2012, 11:42 am
From: Kyle Finley <kylefin...@gmail.com>
Date: Fri, 3 Aug 2012 10:42:42 -0500
Local: Fri, Aug 3 2012 11:42 am
Subject: Re: [google-appengine] How can I block curl requests

> I think you change 401 in this code to 429

I wish it was that easy. Webapp2 uses dictionary to return the status code / message and 429 didn't make the list.

<pre>Traceback (most recent call last):
  File &quot;/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAp pEngine-default.bundle/Contents/Resources/google_appengine/google/appengine /ext/webapp/_webapp25.py&quot;, line 701, in __call__
    handler.get(*groups)
  File &quot;/Users/finley/dev/scotch/operation_curl_block/main.py&quot;, line 7, in get
    return self.error(429)
  File &quot;/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAp pEngine-default.bundle/Contents/Resources/google_appengine/google/appengine /ext/webapp/_webapp25.py&quot;, line 435, in error
    self.response.set_status(code)
  File &quot;/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAp pEngine-default.bundle/Contents/Resources/google_appengine/google/appengine /ext/webapp/_webapp25.py&quot;, line 279, in set_status
    message = Response.http_status_message(code)
  File &quot;/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAp pEngine-default.bundle/Contents/Resources/google_appengine/google/appengine /ext/webapp/_webapp25.py&quot;, line 341, in http_status_message
    raise Error('Invalid HTTP status code: %d' % code)
Error: Invalid HTTP status code: 429


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Drake  
View profile  
 More options Aug 3 2012, 11:45 am
From: "Drake" <drak...@digerat.com>
Date: Fri, 3 Aug 2012 08:45:33 -0700
Local: Fri, Aug 3 2012 11:45 am
Subject: RE: [google-appengine] How can I block curl requests

Ah, I hadn't checked. I usually return a permission denied Error, or a Busy
Error, 503 I think (sorry not at my desk)

From: google-appengine@googlegroups.com
[mailto:google-appengine@googlegroups.com] On Behalf Of Kyle Finley
Sent: Friday, August 03, 2012 8:43 AM
To: google-appengine@googlegroups.com
Subject: Re: [google-appengine] How can I block curl requests

I think you change 401 in this code to 429

I wish it was that easy. Webapp2 uses dictionary to return the status code /
message and 429 didn't make the list.

<pre>Traceback (most recent call last):

  File
&quot;/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAp p
Engine-default.bundle/Contents/Resources/google_appengine/google/appengine/ e
xt/webapp/_webapp25.py&quot;, line 701, in __call__

    handler.get(*groups)

  File &quot;/Users/finley/dev/scotch/operation_curl_block/main.py&quot;,
line 7, in get

    return self.error(429)

  File
&quot;/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAp p
Engine-default.bundle/Contents/Resources/google_appengine/google/appengine/ e
xt/webapp/_webapp25.py&quot;, line 435, in error

    self.response.set_status(code)

  File
&quot;/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAp p
Engine-default.bundle/Contents/Resources/google_appengine/google/appengine/ e
xt/webapp/_webapp25.py&quot;, line 279, in set_status

    message = Response.http_status_message(code)

  File
&quot;/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAp p
Engine-default.bundle/Contents/Resources/google_appengine/google/appengine/ e
xt/webapp/_webapp25.py&quot;, line 341, in http_status_message

    raise Error('Invalid HTTP status code: %d' % code)

Error: Invalid HTTP status code: 429

--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to
google-appengine+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joshua Smith  
View profile  
 More options Aug 3 2012, 11:45 am
From: Joshua Smith <JoshuaESm...@charter.net>
Date: Fri, 3 Aug 2012 11:45:45 -0400
Local: Fri, Aug 3 2012 11:45 am
Subject: Re: [google-appengine] How can I block curl requests

I would have thought self.error(429). That doesn't work? Is there a doc that says what codes are are allowed to return?

On Aug 3, 2012, at 11:02 AM, Kyle Finley <kylefin...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kyle Finley  
View profile  
 More options Aug 3 2012, 11:52 am
From: Kyle Finley <kylefin...@gmail.com>
Date: Fri, 3 Aug 2012 10:52:09 -0500
Local: Fri, Aug 3 2012 11:52 am
Subject: Re: [google-appengine] How can I block curl requests

@Brandon
Yes, 503 would probably be better then 401.

@Joshua
No 429 doesn't work. I don't know if the allowed return values are documented, but here's the source:
http://code.google.com/p/googleappengine/source/browse/trunk/python/g...

On Aug 3, 2012, at 10:45 AM, Joshua Smith wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kate  
View profile  
 More options Aug 6 2012, 2:26 pm
From: Kate <mss.ka...@gmail.com>
Date: Mon, 6 Aug 2012 11:26:17 -0700 (PDT)
Local: Mon, Aug 6 2012 2:26 pm
Subject: Re: [google-appengine] How can I block curl requests

@Kyle

I changed to 503  and didn't update my python.

Is this good or bad????

C:\inetpub>curl -v http://www.coolabah.com
* About to connect() to www.coolabah.com port 80 (#0)
*   Trying 205.178.189.131...
* connected
* Connected to www.coolabah.com (205.178.189.131) port 80 (#0)

> GET / HTTP/1.1
> User-Agent: curl/7.26.0
> Host: www.coolabah.com
> Accept: */*

< HTTP/1.1 302 Moved Temporarily
< Content-Length: 0
< Location: /?bee68f00
<
* Connection #0 to host www.coolabah.com left intact
* Closing connection #0

\inetpub>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kate  
View profile  
 More options Aug 6 2012, 2:37 pm
From: Kate <mss.ka...@gmail.com>
Date: Mon, 6 Aug 2012 11:37:42 -0700 (PDT)
Local: Mon, Aug 6 2012 2:37 pm
Subject: Re: [google-appengine] How can I block curl requests

OOPs. my error.

If  I curl to http://aussieclouds.appspot.com or to
http://www.australiansabroad.com it gets through still. I will update
pyphon. coolabah.com points to australiansabroad.com and I thought they
resolved to the same address. Apparently not.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kate  
View profile  
 More options Aug 6 2012, 2:50 pm
From: Kate <mss.ka...@gmail.com>
Date: Mon, 6 Aug 2012 11:50:55 -0700 (PDT)
Local: Mon, Aug 6 2012 2:50 pm
Subject: Re: [google-appengine] How can I block curl requests

Just read this. Thanks.

Looks like it works now.

Thanks to all!!!!!

Kate


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kate  
View profile  
 More options Aug 6 2012, 2:58 pm
From: Kate <mss.ka...@gmail.com>
Date: Mon, 6 Aug 2012 11:58:30 -0700 (PDT)
Local: Mon, Aug 6 2012 2:58 pm
Subject: Re: [google-appengine] How can I block curl requests

But I still don't like them hitting my site every 500 ms! e.g.

   1.
      1.  2012-08-06 13:56:02.725 / 401 32ms 0kb curl/7.18.2
      (i386-redhat-linux-gnu) libcurl/7.18.2 NSS/3.12.2.0 zlib/1.2.3
      libidn/0.6.14 libssh2/0.18
   2.
      1.  2012-08-06 13:56:02.279 / 401 70ms 0kb curl/7.19.7
      (i386-redhat-linux-gnu) libcurl/7.19.7 NSS/3.12.6.2 zlib/1.2.3 libidn/1.9
      libssh2/1.2.4
   3.
      1.  2012-08-06 13:55:57.921 / 401 29ms 0kb curl/7.18.2
      (i386-redhat-linux-gnu) libcurl/7.18.2 NSS/3.12.2.0 zlib/1.2.3
      libidn/0.6.14 libssh2/0.18
   4.
      1.  2012-08-06 13:55:55.403 / 401 9ms 0kb curl/7.18.2
      (i386-redhat-linux-gnu) libcurl/7.18.2 NSS/3.12.2.0 zlib/1.2.3
      libidn/0.6.14 libssh2/0.18
   5.
      1.  2012-08-06 13:55:54.323 / 401 52ms 0kb curl/7.19.7
      (i386-redhat-linux-gnu) libcurl/7.19.7 NSS/3.12.6.2 zlib/1.2.3 libidn/1.9
      libssh2/1.2.4
   6.
      1.  2012-08-06 13:55:54.283 / 401 33ms 0kb curl/7.18.2
      (i386-redhat-linux-gnu) libcurl/7.18.2 NSS/3.12.2.0 zlib/1.2.3
      libidn/0.6.14 libssh2/0.18
   7.
      1.  2012-08-06 13:55:52.814 / 401 82ms 0kb curl/7.18.2
      (i386-redhat-linux-gnu) libcurl/7.18.2 NSS/3.12.2.0 zlib/1.2.3
      libidn/0.6.14 libssh2/0.18
   8.
      1.  2012-08-06 13:55:52.437 / 401 50ms 0kb curl/7.18.2
      (i386-redhat-linux-gnu) libcurl/7.18.2 NSS/3.12.2.0 zlib/1.2.3
      libidn/0.6.14 libssh2/0.18
   9.
      1.  2012-08-06 13:55:49.063 / 401 33ms 0kb curl/7.18.2
      (i386-redhat-linux-gnu) libcurl/7.18.2 NSS/3.12.2.0 zlib/1.2.3
      libidn/0.6.14 libssh2/0.18
   10.
      1.  2012-08-06 13:55:45.986 / 401 10ms 0kb curl/7.18.2
      (i386-redhat-linux-gnu) libcurl/7.18.2 NSS/3.12.2.0 zlib/1.2.3
      libidn/0.6.14 libssh2/0.18
   11.
      1.  2012-08-06 13:55:43.610 / 401 18ms 0kb curl/7.18.2
      (i386-redhat-linux-gnu) libcurl/7.18.2 NSS/3.12.2.0 zlib/1.2.3
      libidn/0.6.14 libssh2/0.18
   12.
      1.  2012-08-06 13:55:42.189 / 401 29ms 0kb curl/7.18.2
      (i386-redhat-linux-gnu) libcurl/7.18.2 NSS/3.12.2.0 zlib/1.2.3
      libidn/0.6.14 libssh2/0.18
   13.
      1.  2012-08-06 13:55:42.114 / 401 76ms 0kb curl/7.18.2
      (i386-redhat-linux-gnu) libcurl/7.18.2 NSS/3.12.2.0 zlib/1.2.3
      libidn/0.6.14 libssh2/0.18
   14.
      1.  2012-08-06 13:55:39.592 / 401 51ms 0kb curl/7.21.0
      (x86_64-redhat-linux-gnu) libcurl/7.21.0 NSS/3.12.10.0 zlib/1.2.5
      libidn/1.18 libssh2/1.2.4
   15.
      1.  2012-08-06 13:55:38.948 / 401 85ms 0kb curl/7.18.2
      (i386-redhat-linux-gnu) libcurl/7.18.2 NSS/3.12.2.0 zlib/1.2.3
      libidn/0.6.14 libssh2/0.18
   16.
      1.  2012-08-06 13:55:38.945 / 401 130ms 0kb curl/7.19.7
      (i386-redhat-linux-gnu) libcurl/7.19.7 NSS/3.12.6.2 zlib/1.2.3 libidn/1.9
      libssh2/1.2.4
   17.
      1.  2012-08-06 13:55:38.944 / 401 123ms 0kb curl/7.18.2
      (i386-redhat-linux-gnu) libcurl/7.18.2 NSS/3.12.2.0 zlib/1.2.3
      libidn/0.6.14 libssh2/0.18


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kyle Finley  
View profile  
 More options Aug 6 2012, 3:43 pm
From: Kyle Finley <kylefin...@gmail.com>
Date: Mon, 6 Aug 2012 14:43:22 -0500
Local: Mon, Aug 6 2012 3:43 pm
Subject: Re: [google-appengine] How can I block curl requests

Hopefully they will stop once they realizes they're being blocked - if it's a legitimate service. If they are not, and they are reading this thread, they will probably just change their user agent, though. The only way to stop them from reaching your app entirely would be to use a service like CloudFlare. I have no personal experience with CloudFlare, however, so I can not state definitively that it will solve your problem.  And adding an additional layer can result in it's own issues, as demonstrated by the August 1st CloudFlare block.

- Kyle

On Aug 6, 2012, at 1:58 PM, Kate wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joshua Smith  
View profile  
 More options Aug 6 2012, 3:53 pm
From: Joshua Smith <JoshuaESm...@charter.net>
Date: Mon, 6 Aug 2012 15:53:46 -0400
Local: Mon, Aug 6 2012 3:53 pm
Subject: Re: [google-appengine] How can I block curl requests

You could have some fun with them. Instead of returning an error, you could redirect them someplace:

Replace self.error(401) with:

self.redirect("http://localhost/")

for example. Curl does follow redirects by default, but it doesn't have to, so this may or may not have an effect.

If they are following redirects, you could set up a backend with a handler that just sleeps for 30 seconds. Then redirect them all to that one backend, where they can all sit in line waiting.

On Aug 6, 2012, at 2:58 PM, Kate <mss.ka...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kate  
View profile  
 More options Aug 6 2012, 5:24 pm
From: Kate <mss.ka...@gmail.com>
Date: Mon, 6 Aug 2012 14:24:06 -0700 (PDT)
Local: Mon, Aug 6 2012 5:24 pm
Subject: Re: [google-appengine] How can I block curl requests

I like it!!!!!!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ernesto Oltra  
View profile  
 More options Aug 6 2012, 6:53 pm
From: Ernesto Oltra <ernestoka...@gmail.com>
Date: Mon, 6 Aug 2012 15:53:21 -0700 (PDT)
Local: Mon, Aug 6 2012 6:53 pm
Subject: Re: [google-appengine] How can I block curl requests

In fact that server already exists, blackhole.webpagetest.org ensures it
will never answer to anything.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kate  
View profile  
 More options Aug 8 2012, 1:11 pm
From: Kate <mss.ka...@gmail.com>
Date: Wed, 8 Aug 2012 10:11:28 -0700 (PDT)
Local: Wed, Aug 8 2012 1:11 pm
Subject: Re: [google-appengine] How can I block curl requests

It isn't stopping them. I am just not getting errors. What is troubling is that these curl requests are counting as hits and there are so many of tens of thousands of them it is hard for me to analyze site traffic as genuine requests are buried in the curl stats.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kyle Finley  
View profile  
 More options Aug 8 2012, 1:24 pm
From: Kyle Finley <kylefin...@gmail.com>
Date: Wed, 8 Aug 2012 12:24:36 -0500
Local: Wed, Aug 8 2012 1:24 pm
Subject: Re: [google-appengine] How can I block curl requests
In the admin logs - under options - you can filter by regular expression. Does that help?

On Aug 8, 2012, at 12:11 PM, Kate wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kate  
View profile  
 More options Aug 8 2012, 1:49 pm
From: Kate <mss.ka...@gmail.com>
Date: Wed, 8 Aug 2012 10:49:27 -0700 (PDT)
Local: Wed, Aug 8 2012 1:49 pm
Subject: Re: [google-appengine] How can I block curl requests

Thanks Kyle, it does help. But I still hate those nasty people! I opened a production issue with google a week ago so maybe they will help someday ...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kate  
View profile  
 More options Aug 8 2012, 11:17 pm
From: Kate <mss.ka...@gmail.com>
Date: Wed, 8 Aug 2012 20:17:32 -0700 (PDT)
Local: Wed, Aug 8 2012 11:17 pm
Subject: Re: [google-appengine] How can I block curl requests

My site is now down as I'm  over quota. I can't tun billing on as it is too
expensive to pay for these dos attacks.

Thanks everyone for being helpful but I think I'm beaten on this. It seems
a pity that a non profit site could be brought down by this but that's the
case.
Google doesn't seem to care as there has been no response on my production
issue. I suppose it isn't in their interest as I either pay for the attacks
or lose my site. V discouraging.

All attempts at blocking the attacks has only increased their volume.

Kate


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kyle Finley  
View profile  
 More options Aug 9 2012, 1:22 am
From: Kyle Finley <kylefin...@gmail.com>
Date: Wed, 8 Aug 2012 22:22:16 -0700 (PDT)
Local: Thurs, Aug 9 2012 1:22 am
Subject: Re: [google-appengine] How can I block curl requests

Kate,

Sorry to hear that. So CloudFlare.com wasn't able to block it?

- Kyle


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
sergey  
View profile  
 More options Aug 9 2012, 3:43 am
From: sergey <s.lyapus...@gmail.com>
Date: Thu, 9 Aug 2012 00:43:03 -0700 (PDT)
Local: Thurs, Aug 9 2012 3:43 am
Subject: Re: [google-appengine] How can I block curl requests

Can you show what you have in log for curl requests?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kate  
View profile  
 More options Aug 9 2012, 7:59 am
From: Kate <mss.ka...@gmail.com>
Date: Thu, 9 Aug 2012 04:59:57 -0700 (PDT)
Local: Thurs, Aug 9 2012 7:59 am
Subject: Re: [google-appengine] How can I block curl requests

Hi Sergey,

Here is a typical example
2012-08-09 06:51:16.597 / 302 30ms 0kb curl/7.18.2 (i386-redhat-linux-gnu) libcurl/7.18.2 NSS/3.12.2.0 zlib/1.2.3 libidn/0.6.14 libssh2/0.18
202.125.215.12 - - [09/Aug/2012:04:51:16 -0700] "HEAD / HTTP/1.1" 302 153 - "curl/7.18.2 (i386-redhat-linux-gnu) libcurl/7.18.2 NSS/3.12.2.0 zlib/1.2.3 libidn/0.6.14 libssh2/0.18" "aussieclouds.appspot.com" ms=31 cpu_ms=0 api_cpu_ms=0 cpm_usd=0.000049 instance=00c61b117c2f994812ed63184c9c5544dea738

But the ip address varies. My code forces 302 response. Before I added the code they were throwing errors head method not found. But even though I am doing the 303 I am still getting front end time exceeded and these requests are taking up about 95% of my quota. So to keep the site alive I would have to pay for them, I have lost most of my European and Australian visitors because the site is down every night during those places daylight hours. Obviously I can't continue like this and so will have to move to a provider capable of blocking these requests,


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kate  
View profile  
 More options Aug 9 2012, 7:59 am
From: Kate <mss.ka...@gmail.com>
Date: Thu, 9 Aug 2012 04:59:58 -0700 (PDT)
Local: Thurs, Aug 9 2012 7:59 am
Subject: Re: [google-appengine] How can I block curl requests

Hi Sergey,

Here is a typical example
2012-08-09 06:51:16.597 / 302 30ms 0kb curl/7.18.2 (i386-redhat-linux-gnu) libcurl/7.18.2 NSS/3.12.2.0 zlib/1.2.3 libidn/0.6.14 libssh2/0.18
202.125.215.12 - - [09/Aug/2012:04:51:16 -0700] "HEAD / HTTP/1.1" 302 153 - "curl/7.18.2 (i386-redhat-linux-gnu) libcurl/7.18.2 NSS/3.12.2.0 zlib/1.2.3 libidn/0.6.14 libssh2/0.18" "aussieclouds.appspot.com" ms=31 cpu_ms=0 api_cpu_ms=0 cpm_usd=0.000049 instance=00c61b117c2f994812ed63184c9c5544dea738

But the ip address varies. My code forces 302 response. Before I added the code they were throwing errors head method not found. But even though I am doing the 303 I am still getting front end time exceeded and these requests are taking up about 95% of my quota. So to keep the site alive I would have to pay for them, I have lost most of my European and Australian visitors because the site is down every night during those places daylight hours. Obviously I can't continue like this and so will have to move to a provider capable of blocking these requests,


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Messages 26 - 50 of 68 < Older  Newer >
« Back to Discussions « Newer topic     Older topic »