Re: How to limit source IP in PHP

From: Date: Fri, 14 Sep 2012 20:00:50 +0000
Subject: Re: How to limit source IP in PHP
References: 1 2 3 4 5 6 7 8 9 10 11 12 13  Groups: php.general 
Request: Send a blank email to php-general+get-319089@lists.php.net to get a copy of this message
Il 14/09/2012 21:19, Jim Lucas ha scritto:
On 09/13/2012 04:15 PM, Tonix (Antonio Nati) wrote:
Jim, sorry but you did not read carefully my posts. Since the fist post, I ALWAYS spoke about connections a PHP script may open autonomously (what you name second connection). I'm never speaking about listening/intercepting/using the original HTTP request.
Then why did you bring up apache? That seems to be the source of confusion...
There is no confusion at all. When a script is executing under apache, it can do whatever it wants (within its permissions of course), opening other sockets and making any kind of processing and IO. It does not interphere with apache connections, it just uses new connections. So, my request is clear: how to force a PHP script to bind only to permitted IP (i.e. using directive similar to OPEN_BASEDIR). The answer is clear. Actually PHP cannot force a PHP script to bind only to specific IPs. So I've filed a request in PHP bug's repository for examining this possibility. In a multi IP apache configuration, I feel right each PHP script should only (eventually) bind to the IP where the connection is received, or to a permitted IP. Hope this helps. Tonino -- ------------------------------------------------------------ Inter@zioni Interazioni di Antonio Nati http://www.interazioni.it tonix@interazioni.it ------------------------------------------------------------

« previous php.general (#319089) next »