Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sending HTTP requests from a different IP address...

Status
Not open for further replies.

WMAdam

Programmer
Jun 5, 2002
14
US
Hi Everyone,
I was wondering if anyone had some insight on how to do this: I have a FreeBSD server that has a dozen or so IP addresses assigned to it, that it answers for. My question is, is it possible for a PHP page hosted on that server or a perl script to make an HTTP request to another server and actually CHOOSE which of the assigned IP addresses gets used for the request, instead of always the same default IP address of the box?
Any help is greatly appreciated!
Thanks,
Adam
 
Don't think so the machine doesn't use the virtual addresses even in NT its the Primary IP

Sorry (95% sure I'm right but maybe someone knows different)
 
There may be a way to do that, but it is really a routing issue, not a PHP fix.

If you define static routes to the other servers, using the virtual IP address as the gateway, it may work. I say may primarily because I don't know if these other servers on the internet (in which case using the IP address rather than DNS could be a very bad thing).

Also, it would mean that ALL requests to a given other server would leave from the static route's gateway (virtual IP address).

It is an ugly solution.

pansophic
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top