I have set a dedicated IP for a website (using directadmin), but all outgoing php requests are sent from the server's shared IP. Result of the following code is always the shared IP.
$a = file_get_contents("http://mxtoolbox.com/WhatIsMyIP/");
print $a;
I need to send requests from dedicated IP because my payment gateway only accepts requests from that IP.
Do I need to add iptables rules to send all requests from the dedicated IP or there is a better way?