Notes |
|
|
another option: use mod_perl instead of cgi handler |
|
|
(0001460)
|
obilodeau
|
2010-02-01 13:14
(edited on: 2010-02-01 15:16) |
|
|
|
|
Another option is to take the opposite approach at User-Agent blocking: blacklist all agents except the known big desktop browsers. Chances are that a given user will carry at least one of firefox, chrome, opera, safari or IE. Yes, maybe they use Flock or Links but when they have no network access, they'll try the other ones. |
|
|
|
For the purpose of this ticket, the 'denial of service' aspect has been considered a performance problem. The current fix doesn't consider malicious DoS but more misconfigured clients, softwares who we putting a lot of pressure on the portal.
The 'fix' can be divided in two:
- use of mod_perl to get more performance out of the current cgi scripts
Our current portal scripts were used as CGI which means that apache started a perl interpreter, compiled the code and handed over the execution to a new process for each request. Moving under mod_perl where the perl interpreter is part of the apache thread is a huge gain right there. This is phase 1 of several phases where we integrate better with mod_perl's philosophy.
- some rewrite rules to return HTML Forbidden (status 403) to non-browser clients (disabled by default)
A lot of the requests are done by misbehaving clients (ex: iPhone Apps trying very hard to fetch stuff from the web spawning thousands of web requests over a few hours). Since we redirect 'every' request to the captive portal these clients hurt.
By having easy to implement rules that cut all that crap from reaching our captive portal, we can get improved performance.
See 0001072 for more info on this.
The work has been done in a feature branch: org.packetfence.feature.captive-portal-performance |
|
|
|
fix is now in branch 1.9 (feature branch merged) |
|