Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

apache security

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Next:  Need help with apache solaris startup problem  
Author Message
stuart_miller

External


Since: May 11, 2004
Posts: 55



(Msg. 1) Posted: Thu Jul 22, 2004 9:25 pm
Post subject: apache security
Archived from groups: alt>apache>configuration (more info?)

I have my server configured to do a limited number of functions, and I an
satisfied for the time being.

The problem is in it doing tasks I do not want. There are a series of these,
and I will present one problem at a time.

I have been reported as allowing spam to originate from this system. I do
not (that I know of) run a mail server here, so that would suggest that
somebody is using the "CONNECT" function to get at a mail server through me.

My logs show 128,000 attempts so far this month to CONNECT to other servers
port 25, so I suspect one or two got through. The usual log entry shows
403 407 or 403 405 or 403 401 What would the return code be if the connect
were successful?

Is is possible to configure apache to refuse or ignore CONNECT attempts? I
can see no value to me in allowing them, only potential problems. The apache
docs deal with internal security, but I have not found a reference to
external issues such as this.

Because my server is for a limited number of visitors, would it be helpful
to switch apache to listen on another port, then advise my welcome visitors
of the new port number?

Stuart

 >> Stay informed about: apache security 
Back to top
Login to vote
davideyeahsure

External


Since: Nov 03, 2003
Posts: 2907



(Msg. 2) Posted: Fri Jul 23, 2004 9:42 am
Post subject: Re: apache security [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Stuart Miller <stuart_miller.RemoveThis@shaw.ca> wrote:
 > port 25, so I suspect one or two got through.

That's just ridicolous. ALL of them goes through or NONE of them.

 > 403 407 or 403 405 or 403 401 What would the return code be if the connect
 > were successful?

A 200 followed by a number of bytes much bigger than your normal 'index'
page.

 > Is is possible to configure apache to refuse or ignore CONNECT attempts?

Sure, use the Allow/Deny options.

 > Because my server is for a limited number of visitors, would it be helpful
 > to switch apache to listen on another port, then advise my welcome visitors
 > of the new port number?

Why should you use a non-standard port for a standard services? If you
have a _fixed_ number of _known_ visitors put theirs IPs in your
Allow option and allow only them to connect. Or use your firewall.

This way they don't have to do anything special to use your service.

Davide

--
| No, `Eureka' is Greek for `This bath is too hot.'
|
|
|<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: apache security 
Back to top
Login to vote
stuart_miller

External


Since: May 11, 2004
Posts: 55



(Msg. 3) Posted: Sat Jul 24, 2004 11:24 am
Post subject: Re: apache security [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Davide Bianchi" <davideyeahsure.RemoveThis@onlyforfun.net> wrote in message
news:2mbqb3Fknh9lU2@uni-berlin.de...
 > Stuart Miller <stuart_miller.RemoveThis@shaw.ca> wrote:
  > > port 25, so I suspect one or two got through.
 >
 > That's just ridicolous. ALL of them goes through or NONE of them.

I guess my intended meaning there was unclear. I can see that all of the
requests would be attempted, but I thought they would all be blocked by the
target system's security on their mail server. It looks like some did get
through to the target. With the info below I will go through the logs to
determine which ones did.
 >
  > > 403 407 or 403 405 or 403 401 What would the return code be if the
connect
  > > were successful?
 >
 > A 200 followed by a number of bytes much bigger than your normal 'index'
 > page.
 >
  > > Is is possible to configure apache to refuse or ignore CONNECT attempts?
 >
 > Sure, use the Allow/Deny options.

I went through the docs, and did find the references, but it is still
somewhat fuzzy in my head.

I think this will do the job

in <lfModule mod_setenvif.c>
..... there are a number of browsermatch directives
I should add something like
SetEnvIf NoCase request_method GET ok-to-process


then further up in <Directory /Docroot> or in <Directory /> add the lines
order deny allow
deny from all
allow from env=ok-to-process


As I understand it, this will only allow apache to process http requests
which are GET
which is fine for static pages. This will eliminate apache even trying
post, connect, etc
I can figure out how to make the perl scripts work later, like perhaps put a
password on the
pages that call the scripts and 'allow' for that directory only.

The other way that looks like it would work is
<Location />
<LimitExcept GET>
Require valid_user
</Limit>
</Location>

It apears that this only applies to my file system, so I would have to add
<Location <a style='text-decoration: underline;' href="http://" target="_blank">http://</a>*>
and the same directives

From my reading of the docs, this would prevet requests for other servers
pages through this system.


Is this going in the right direction?

 >
  > > Because my server is for a limited number of visitors, would it be
helpful
  > > to switch apache to listen on another port, then advise my welcome
visitors
  > > of the new port number?
 >
 > Why should you use a non-standard port for a standard services? If you
 > have a _fixed_ number of _known_ visitors put theirs IPs in your
 > Allow option and allow only them to connect.

some of them connect through dialup so have dynamic ip's

Thanks for the help

Stuart<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: apache security 
Back to top
Login to vote
davideyeahsure

External


Since: Nov 03, 2003
Posts: 2907



(Msg. 4) Posted: Sat Jul 24, 2004 6:48 pm
Post subject: Re: apache security [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Stuart Miller <stuart_miller.TakeThisOut@shaw.ca> wrote:
 > requests would be attempted, but I thought they would all be blocked by the
 > target system's security on their mail server.

Which 'system security' on the target? If someone is trying to fool
a mail server 'proxying' trought a Web server it means only that the
mail server is really badly configured...

 > The other way that looks like it would work is
 > <Location />
 > <LimitExcept GET>
 > Require valid_user
 > </Limit>
 > </Location>

Yes exactly, you can apply the Limit or LimitExcept to Location,
Directory an entire Host or VirtualHost.

<Limit CONNECT>
  Order deny, allow
  Deny from all
</Limit>


 > some of them connect through dialup so have dynamic ip's

Then it does make sorta-sense to have Apache on a non-standard port,
be sure that their ISP allow 'weird' ports to be used.

Davide

--
| fortune: cpu time/usefulness ratio too high -- core dumped.
|
|
|<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: apache security 
Back to top
Login to vote
stuart_miller

External


Since: May 11, 2004
Posts: 55



(Msg. 5) Posted: Sun Jul 25, 2004 10:32 am
Post subject: Re: apache security [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Davide Bianchi" <davideyeahsure RemoveThis @onlyforfun.net> wrote in message
news:2mfemiFlp1tnU4@uni-berlin.de...
 > Stuart Miller <stuart_miller RemoveThis @shaw.ca> wrote:
 >
  > > The other way that looks like it would work is
  > > <Location />
  > > <LimitExcept GET>
  > > Require valid_user
  > > </Limit>
  > > </Location>
 >
 > Yes exactly, you can apply the Limit or LimitExcept to Location,
 > Directory an entire Host or VirtualHost.

This works to eliminate POST etc on my server, but what can I do about the
outside world?
I have dozens of systems which connect to mine as soon as I bring it online,
all sending GET requests

Question
I am using <Location /> for all of my system, and this appears to work
What is the format for <Location> to mean all the rest of the world?
Or, how do we define behavior for the entire host?
Even when I have it restricted so I can not do a GET to my files, others are
doing a GET on yahoo etc through me.
In about an hour I had 5000 proxy requests. Some now get a 999 or 500 return
code, but some still get a 200 code.

I want to reject all proxy attempts, then perhaps they will give up and take
me off their lists.

Stuart<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: apache security 
Back to top
Login to vote
davideyeahsure

External


Since: Nov 03, 2003
Posts: 2907



(Msg. 6) Posted: Sun Jul 25, 2004 11:40 am
Post subject: Re: apache security [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Stuart Miller <stuart_miller DeleteThis @shaw.ca> wrote:
 > Even when I have it restricted so I can not do a GET to my files, others are
 > doing a GET on yahoo etc through me.

They can do a 'get' on a different server only if you are running an
open proxy. If you aren't, then they get nothing.

 > In about an hour I had 5000 proxy requests. Some now get a 999 or 500 return
 > code, but some still get a 200 code.

Check the size of the returned page, chance are that they just got your
default home page instead.

Davide

--
| Boren's Laws: (1) When in charge, ponder. (2) When in trouble,
| delegate. (3) When in doubt, mumble.
|
|<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: apache security 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Apache Security - I have a website running and the images are in a fodler called /images. I havbe discovered that if you type the url and then /images/ you get a list of everything in that folder. is there any way this can be stopped?

security with Apache & PHP - I really hope someone out there has the answer cause I'm a little worried about this. Here's what is happening: I have Apache with PHP running on a win2k box. The Apache service logs on with a dummy user account (MYDOMAIN\apache). The server is..

security apache windows - Hello, could somebody give me some advice how so make a apache2 with php4.x and mysql secure under windows. The server will be on the internet and have also ftp access. So i must make sure that the apache+php+mysql configuration is secure when someone..

Apache 2.0.47 and Security Hole with nessus? - Hello... I have installed the Apache server 2.0.47 on a WINSERVER2000 machine. I am using it only to serve simple HMTL. I have not specifically installed or configured Tomcat. As a precautionary measure, I hit the box using a nessus client from Linux.....

HOW-TO configure SSL to SSL redirect on Apache without gen.. - We need to rename an SSL site. We have hundreds of customers that already have bookmarks directly to the original site. Is there anyway that we can redirect the old SSL URL to a new SSL URL using a new certificate for the new name without generating a....
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]