![]() |
|
|
|
|
|
|
2
30th October 20:34
External User
Posts: 1
|
I might be wrong but I think your problem goes beyond allowing URLs in
fopen. A user could just as well use cURL to build a self-calling script. You might need to put a filter on apache on the number of requests (what's the version of apache?). The usual problem with allowing URLs in fopen and in "include" or "require" is that users do some stupid stuff like include($_GET['script'].'.php') and get a myriad of remote code executed on your server (usually used by spammers to send email using your server). However, to secure a php installation on a per-domain basis you can try http://www.hardened-php.net/suhosin. I can't remember if it covers the URL stuff, but you can enable/disable PHP functions on a per-domain basis (apache virtual host configuration) which you will likely need if you are the manager for a shared hosting enviroment. Rob Andrés Robinet | Lead Developer | BESTPLACE CORPORATION 5100 Bayview Drive 206, Royal Lauderdale Landings, Fort Lauderdale, FL 33308 | TEL 954-607-4207 | FAX 954-337-2695 Email: info@bestplace.net | MSN Chat: best@bestplace.net | SKYPE: bestplace | Web: http://www.bestplace.biz | Web: http://www.seo-diy.com |
|
|
4
31st October 01:55
External User
Posts: 1
|
Thanks for the infos.
I read through the very interesting post, but I did not find it to be a solution for my problem. I tried to limit connections with iptables, but it did not work out. I'm not an expert at this, I tried like it is described here: http://www.linux-noob.com/forums/ind...showtopic=1829 I know it just limits new connections, and I thought this would work out, but it didn't. Should I try to limit all connections? Also it makes me wonder why mod_evasive for apache does not block this. I will probably try to come up with a solution by using mod_security. But it would be much nicer if it would work on the iptables level. Regards, Samy Andrés Robinet schrieb: |
|
|
5
31st October 01:57
External User
Posts: 1
|
Ok, I did find a solution by accident.
I just blocked all tcp requests on port 80 and 443 comming from my own outside IP. Since I have a couple of servers, I just dropped the following into rc.local on all of them: # Blocking url_fopen requests ownip=`curl -s http://checkip.dyndns.org | awk '{print $6}' | awk ' BEGIN { FS = "<" } { print $1 } '` iptables -A INPUT -s $ownip -p tcp --dport 80 -j DROP iptables -A INPUT -s $ownip -p tcp --dport 443 -j DROP Maybe this helps somebody ![]() Regards, Samy Samuel Vogel schrieb: |
|