Limiting what IP curlopt_interface can use per client

crspyjohn

Verified User
Joined
May 5, 2006
Messages
43
I'm having a problem where my customers are able to bind their php scripts to any IP address assigned to the server. Is there a way to limit which IP address can be used for outgoing network connections per account? Ideally, I would like to limit them to the shared server IP and their dedicated IP address...

// Set IP for outgoing network connection
$IPS = Array('199.167.133.17','199.167.133.20','199.167.1 33.21','199.167.133.22');
srand(time()); //seed start of PRNG
$ip = $IPS[ rand(0, count($IPS)-1) ];

$toSet[CURLOPT_INTERFACE] = $ip;
 
DirectAdmin runs on both Linux and FreeBSD, and since the firewall methodology is completely different, leaves firewalling to the administrator, depending on which OS he or she selects.

Jeff
 
Back
Top