Forum Moderators: phranque
64.63.216.141 - - [12/Feb/2004:08:47:29 -0500] "POST [64.63.216.141:25...] HTTP/1.1" 200 240
64.63.216.141 - - [12/Feb/2004:08:47:31 -0500] "CONNECT vmb-ext.prodigy.net:25 HTTP/1.0" 200 231
someone suggested on another part of the forum
RewriteCond %{REQUEST_URL} \:25(/)?$
RewriteRule .* - [F]
I don't use any cgi forms on this particular site so blocking all POST requests wouldn't be a problem but I wasn't sure of the correct syntax to do so in htaccess
It might be much simpler to block all CONNECTS and requests for resources that begin with "http://" but contain some other domain name (not your own), since that's a dead give-away that someone is trying to use your server as a proxy.
In .htaccess:
# BLOCK unsupported HTTP methods
RewriteCond %{REQUEST_METHOD} !^(GET¦HEAD¦OPTIONS¦POST¦TRACE)$
RewriteRule .* - [F]
# Bypass remaining code to allow HTTP-compliant OPTIONS and TRACE server responses
RewriteCond %{REQUEST_METHOD} ^(OPTIONS¦TRACE)$
RewriteRule .* - [L]
# Block attempts to use our server as a proxy, but allow absolute URIs
RewriteCond %{THE_REQUEST} ^(GET¦HEAD¦POST)\ /?http:// [NC]
RewriteCond %{THE_REQUEST} !^(GET¦HEAD¦POST)\ /?http://(www\.¦test\.)?MyDomain\.com/ [NC]
RewriteRule .* - [F]
RewriteRule !^403\.html$ - [F]
RewriteRule ^403\.html$ - [L]
Jim
Lemat
I did try
<Limit GET POST OPTIONS PROPFIND>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS PROPFIND>
Order deny,allow
Deny from all
</LimitExcept>
it gave me a 500 server error
and how do you turn off proxy?
Still new at the server side of this.
Also look at the apache error_log -> there should be an explanation why 500's show up. And of course we'd like to know it too...
And the second problem:
apache is a set of modules -> look at the directive LoadModule in config file -> try to experiment which *proxy* modules you can safe not-to-load.
You can also compile from sources a brand new apache --without-proxy (smth. like that)