You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Steve Swift <st...@gmail.com> on 2007/08/23 09:00:15 UTC
[users@httpd] Telling one IP address 404 "Nothing found"
Is it possible to block a specific IP address such that they get 404 "Not
found" no matter what URL they try?
I don't want to use "Deny From" or other IP address blocking schemes,
because that will just alert them to the fact that I have my shields up.
I just want this particular IP address to think that my website is
completely empty.
And yes, it is a fixed IP address, so it's worth doing. It will cause them a
lot more grief to negotiate a different IP address, and hopefully they will
abandon their probing.
Then they'll stop pestering my server with request that all fail
--
Steve Swift
http://www.swiftys.org.uk
Re: [users@httpd] Telling one IP address 404 "Nothing found"
Posted by Vincent Bray <no...@gmail.com>.
On 23/08/07, Steve Swift <st...@gmail.com> wrote:
> Thanks for all the suggestions. I'll wait for a suitable time to reload our
> server, and start off by blocking myself, from our test virtual host.
>
> Incidentally, I forgot one part of my original plan. I presume this will
> get logged in our access/error logs? I don't suppose there's a way to stop
> that.
Indeed. I don't believe there's a way to conditionally log errors,
though plenty of people wish there were.
--
noodl
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Telling one IP address 404 "Nothing found"
Posted by Jeff Peng <je...@gmx.net>.
-------- Original-Nachricht --------
> Datum: Thu, 23 Aug 2007 10:25:03 +0100
> Von: "Steve Swift" <st...@gmail.com>
> An: users@httpd.apache.org
> Betreff: Re: [users@httpd] Telling one IP address 404 "Nothing found"
> Incidentally, I forgot one part of my original plan. I presume this will
> get logged in our access/error logs? I don't suppose there's a way to stop
> that.
I'm not sure if Apache's default config directive can do this.
But for me,I once meet some more complicated filter conditions than yours.Then I wrote an Apache module for it.It's simple to write an Apache module if you're familiar with its API (C API or modperl).In modperl you can use $r->log_error("...") to write error_log.
Good luck!
--
Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Telling one IP address 404 "Nothing found"
Posted by Steve Swift <st...@gmail.com>.
Thanks for all the suggestions. I'll wait for a suitable time to reload our
server, and start off by blocking myself, from our test virtual host.
Incidentally, I forgot one part of my original plan. I presume this will
get logged in our access/error logs? I don't suppose there's a way to stop
that.
On 23/08/07, Vincent Bray <no...@gmail.com> wrote:
>
> Yep, good point. Use the anchors.
>
--
Steve Swift
http://www.swiftys.org.uk
Re: [users@httpd] Telling one IP address 404 "Nothing found"
Posted by Vincent Bray <no...@gmail.com>.
On 23/08/07, Jeff Peng <je...@gmx.net> wrote:
> I'm not sure but would this reject IP like 11.2.3.44?since this also match the regex 1\.2\.3\.4
> or set RewriteCond ${REMOTE_ADDR} ^1\.2\.3\.4$ ?
Yep, good point. Use the anchors.
--
noodl
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Telling one IP address 404 "Nothing found"
Posted by Jeff Peng <je...@gmx.net>.
-------- Original-Nachricht --------
> Datum: Thu, 23 Aug 2007 14:54:46 +0700
> Von: "Vincent Bray" <no...@gmail.com>
> An: users@httpd.apache.org
> Betreff: Re: [users@httpd] Telling one IP address 404 "Nothing found"
> On 23/08/07, Steve Swift <st...@gmail.com> wrote:
> > Is it possible to block a specific IP address such that they get 404
> "Not
> > found" no matter what URL they try?
> >
> > I don't want to use "Deny From" or other IP address blocking schemes,
> > because that will just alert them to the fact that I have my shields up.
> > I just want this particular IP address to think that my website is
> > completely empty.
> > And yes, it is a fixed IP address, so it's worth doing. It will cause
> them a
> > lot more grief to negotiate a different IP address, and hopefully they
> will
> > abandon their probing.
> >
> > Then they'll stop pestering my server with request that all fail
>
> Ok, then let's ignore proper http and try:
>
> RewriteEngine On
> RewriteCond ${REMOTE_ADDR} 1\.2\.3\.4
> RewriteRule ^ - [R=404]
>
I'm not sure but would this reject IP like 11.2.3.44?since this also match the regex 1\.2\.3\.4
or set RewriteCond ${REMOTE_ADDR} ^1\.2\.3\.4$ ?
--
GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Telling one IP address 404 "Nothing found"
Posted by Vincent Bray <no...@gmail.com>.
On 23/08/07, Steve Swift <st...@gmail.com> wrote:
> Is it possible to block a specific IP address such that they get 404 "Not
> found" no matter what URL they try?
>
> I don't want to use "Deny From" or other IP address blocking schemes,
> because that will just alert them to the fact that I have my shields up.
> I just want this particular IP address to think that my website is
> completely empty.
> And yes, it is a fixed IP address, so it's worth doing. It will cause them a
> lot more grief to negotiate a different IP address, and hopefully they will
> abandon their probing.
>
> Then they'll stop pestering my server with request that all fail
Ok, then let's ignore proper http and try:
RewriteEngine On
RewriteCond ${REMOTE_ADDR} 1\.2\.3\.4
RewriteRule ^ - [R=404]
--
noodl
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org