Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 148098 - Patch for apache needed by mod_limitipconn to determine X-Forwarded-For IP addresses
Summary: Patch for apache needed by mod_limitipconn to determine X-Forwarded-For IP ad...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Tom Knight (RETIRED)
URL: http://dev.gentoo.org/~tomk/tmp/apach...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-18 11:13 UTC by Tom Knight (RETIRED)
Modified: 2008-01-14 00:21 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Knight (RETIRED) gentoo-dev 2006-09-18 11:13:12 UTC
net-www/mod_limitipconn comes with a patch for apache which allows the module to determine which IP address requests come from if they originate from behind a proxy. 

The patch was originally created for apache 2.0.39 but can still be applied to 2.0.58 (I haven't tried it with 2.2), an updated can patch can be provided if necessary.

I'd recommend adding a new local USE flag which adds the patch, enables the --enable-forward configure flag and adds an RDEPEND entry for mod_limitipconn.

We are currently trying this out on the forums to prevent DoS attacks and if it proves to be successful then infra would roll it out to other servers.
Comment 1 Kurt Lieber (RETIRED) gentoo-dev 2006-09-18 11:47:41 UTC
/sign
Comment 2 Michael Stewart (vericgar) (RETIRED) gentoo-dev 2006-09-19 10:21:58 UTC
Generally we don't accept third-party patches, but if you are willing to maintain the patch and mod_limitipconn, then we will do it, as the patch seems simple enough. I suggest adding the patch to apache as part of a local USE-flag and then testing for the USE-flag in mod_limitipconn to determine if mod_limitipconn should be built with that option as well.

Go ahead and make the changes as a -r bump to Apache, for both 2.0 and 2.2. A maintainence guide for Apache is here: http://dev.gentoo.org/~vericgar/doc/apache-maintain.html

You will need commit access to the Apache SVN. I'm not sure how to request it, I'm sure someone from infra can help you there.
Comment 3 Tom Knight (RETIRED) gentoo-dev 2006-09-19 14:17:16 UTC
(In reply to comment #2)
> Generally we don't accept third-party patches, but if you are willing to
> maintain the patch and mod_limitipconn, then we will do it, as the patch seems

I'd be happy to maintain mod_limitipconn and its patch.

> simple enough. I suggest adding the patch to apache as part of a local USE-flag
> and then testing for the USE-flag in mod_limitipconn to determine if
> mod_limitipconn should be built with that option as well.

mod_limitipconn adds support for this if Apache is configured with the --enable-forward configure flag (which is provided by the patch) so there's no need for the extra check in the mod_limitipconn ebuild.

Does the addition of mod_limitipconn to Apache's RDEPEND make sense if this local USE flag is enabled? (as mod_limitipconn is the only thing that uses it)
> 
> Go ahead and make the changes as a -r bump to Apache, for both 2.0 and 2.2. A
> maintainence guide for Apache is here:
> http://dev.gentoo.org/~vericgar/doc/apache-maintain.html

I'll do that, nice clear doc BTW.

> 
> You will need commit access to the Apache SVN. I'm not sure how to request it,
> I'm sure someone from infra can help you there.
> 

Apparently all Gentoo devs have write access to the Apache SVN repo so everything should be set up for me to make these changes. Should I also add myself to the Apache herd?
Comment 4 Michael Stewart (vericgar) (RETIRED) gentoo-dev 2006-09-19 22:05:20 UTC
> Does the addition of mod_limitipconn to Apache's RDEPEND make sense if this
> local USE flag is enabled? (as mod_limitipconn is the only thing that uses it)

Maybe PDEPEND, but not RDEPEND (apache doesn't depend on mod_limitipconn at runtime), though I've heard there's issues with PDEPEND as well (but I don't know the details there)

> I'll do that, nice clear doc BTW.

Thanks!

> Apparently all Gentoo devs have write access to the Apache SVN repo so
> everything should be set up for me to make these changes. Should I also add
> myself to the Apache herd?

Thats good to know about the SVN. You should add yourself to the herd and bug alias (apache-bugs@g.o) so that you'll get bugmail for the package. You'll probably want to set up filters in your e-mail client, there's a lot of bugmail on that alias. You can also add yourself to our really out of date project page if you wish as well.
Comment 5 Alex Barker 2008-01-03 23:09:07 UTC
This is really old and sounds similar to an issue I was trying to solve a little while ago... maybe bug #200895 could help?

Comment 6 Benedikt Böhm (RETIRED) gentoo-dev 2008-01-14 00:21:48 UTC
seems like mod_extract_forwarded does the job