Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My Windows Server 2008 server has several IP addresses bound to it's network card. How do I configure it so that connections originating from certain programs, on certain ports, or to specific destinations get specified (instead of the default) source addresses?

For example, how could I configure things so that connections to port 80 or 443, or connections from Firefox use a non-default IP?

share|improve this question
I have already written a sample project which takes a URL and IP address and browse the address with given IP address. The problem is my project is a simple project which returns HTML as text and it cannot render the page. I need an advanced browser with the same functionality. – Xaqron Dec 16 '11 at 16:55
At a bare minimum, the answer would depend on your OS. On another note, this sort of question isn't really within the scope of this site - as you've described it it's more of an end-user issue. – Aaron Dec 16 '11 at 16:59
End users have multihomed servers ?! I've simplified a sophisticated problem here to minimize confusion. I use Windows server 2008 as OS. – Xaqron Dec 16 '11 at 17:43
@Xaqron I've proposed an edit to your question to make it more Server Fault appropriate. I have no idea if it's sufficient to get the question reopened (or even who/how does that.) If you're interested in writing a FF extension, or something, maybe you could ask about it on another Stack Exchange site? – jon Dec 16 '11 at 19:56

IP route selection is done well below the browser itself, so a plugin is highly unlikely to exist.

Depending on your operating system, the IP address your TCP/IP stack selects to put on outgoing packets to random spots on the internet (otherwise known as anything covered by the default route) depends on several things.

  • If the default route gateway is only reachable by a single interface, that's the one that gets used.
  • If a single interface has multiple IP addresses on it, but are on the same subnet, the server will pick one these depending on how the stack was coded:
    • The IP address bound first.
    • The lower IP address.
  • If you have two interfaces with IP addresses that can reach a default route, the selection may be (again, depends on the TCP/IP stack)
    • The interface specified on the routing table for the default route
    • The IP bound to the interface with the smallest ordinal (eth0 not eth1, or Interface 1 not Interface 3 for windows)
    • The interface with the lowest bound IP
share|improve this answer
Specifying the source address of a socket is easily possible within the Berkeley sockets API (just call bind before calling connect.) I presume it's also possible in WinSock (whose API, IIRC, is basically a Berkeley socket ripoff ^H adaptation.) – jon Dec 16 '11 at 19:49

It depends on the operating system.

Win2003 uses the "Weak Host" method. Win2008 and Win2012 use the "Strong Host" method.

More info:

share|improve this answer

I don't know of any browser plugins that allow you to edit the routing of a multihomed system, as such functionality would require administrative privilege.

A TCP/IP networked computer determines which interface and/or address to use for all its out-going packets based on the IP routing tables. Under Linux /sbin/route -n will show the routing for a system. The command is similar under MS Windows I believe.

If the IP addresses are on the same subnet, I believe the system will use a default route or IP address (I believe typically the first address bound to the network interface) unless configured otherwise.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.