0

Hi,

I was wondering if anyone could help.
I've got a linux server with virtual hosts set up with separate ips and domain names.
Everything works fine for incoming requests, but when I send an outgoing call (using curl php but am willing to change if necessary) the ip address received by the target is the server's primary ip address.
I need it to show that it's from the ip address that has been set to the virtual host where the php page is located.
Any help would be appreciated.

Thanks,
Lee

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by sheltant
0

Hello Lee,

If you are trying to get the Webpage from interface "eth1" the your command should be

curl -j --interface eth1 google.com

This will allow you to use make the Curl/Wget from the interface "eth1" instead of default inetface "eth0"..

In case if you are trying to get the Webpage from a Virtual interface say "eth2:1" the your command should be

curl -j --interface eth2:1 google.com

Let me know if you still find difficulty,

Regards,

Sheltan T T

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.