Apache outgoing/outbound IP

Raimo

Verified User
Joined
Oct 7, 2009
Messages
25
As a general rule, even if a domain has a private IP address in DirectAdmin, the IP for outgoing request (PHP scripts in my case) still uses the servers shared IP.
I have two domains, that use a third party security service which requires that the outbound connection from my server uses a pre-agreed IP and they only allow one IP to be used for one domain.
So two domains using the server shared IP for outgoing connections is not accepted.

So how could I use the domains private IP for outgoing connections also. If it requires a manual configuration, its fine, but I'm not sure how to acheive this.
 

sysdev

Verified User
Joined
Jul 16, 2007
Messages
186
You'll have to use a method that allows you to specify the interface. e.g. with php and curl you would use:

curl_setopt($curlh, CURLOPT_INTERFACE, "your dedicated ip");
(or socket_bind() if using sockets)

With wget you would use --bind-address=1.2.3.4 and so on.
 
Top