Controling source IP address used on outbound HTTP GET request



Hi,

We are looking for a way to control the IP address we use for outgoing
HTTP requests so that we can choose between two IP addresses we will
have on a linux server. We have a Linux server running Java/Tomcat
which is making HTTP GET requests to Web servers. We want to be able
to use one IP address when making requests to one Web server and use a
different IP address when making requests to another server. The
actual Java method we are using to get the page is
connection.getInputStream(), and we get a connection with
url.openConnection();

Is it possible to control which of the server's IP addresses is used
for each request, and if so, how? Is there some way we can set up the
Linux server or Tomcat to make it work?

BTW, I believe it is possible to have two IP addresses on a linux
server, but I haven't looked into what's involved. Feel free to
comment on this if relevant.

Thanks!

.



Relevant Pages

  • Re: What doesnt lend itself to OO?
    ... > system design within that context seriously). ... >>The first line exists in the server. ... > objects between client and server i.e. as far as the client code is ... the message data packet data in the server between requests, ...
    (comp.object)
  • Re: [patch 00/13] Syslets, "Threadlets", generic AIO support, v3
    ... I have an embedded server I ... I/O, audio, and child processes that handle VoIP signaling protocols ... want to throttle the concurrency of requests at the kernel level *for ...
    (Linux-Kernel)
  • Re: HttpListener BeginGetContext does not seem to handle more than 2 request simultaneously
    ... my server ran just fine and seemed to ... be aceepting/processing multiple requests simultaneously. ... System.OutOfMemoryException: Exception of type ... K> PR2 2 ...
    (microsoft.public.dotnet.framework)
  • httpd.conf apcahe2 how to make php5 module work ?
    ... # Based upon the NCSA server configuration files originally by Rob McCool. ... # configuration directives that give the server its instructions. ... Directives that control the operation of the Apache server process as a ... which allow Web requests to be sent to ...
    (freebsd-questions)
  • Re: "libexpat.so.5" not found
    ... # Based upon the NCSA server configuration files ... # This is the main Apache server configuration file. ... # configuration directives that give the server its ... # which responds to requests that aren't handled ...
    (freebsd-questions)