Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We have multiple sites in IIS with different IP addresses. This is cool, want different IPs to all go to this server and use the proper site. However I discovered an issue that when the server makes an outgoing connection, I cannot predict which IP it will use. I had to have one client add ALL the IPs to their firewall so that a certain service could communicate with their server. Well now the time has come to add another IP/site to IIS but I had told them they would not need to add any more IPs. So the question is, how can I make Windows Server 2003 use only ONE specific IP for outgoing calls instead of it being unpredictable?

If this is not a good enough description, when I was RDPed into the server and I opened IE and went to 'what is my IP' it was sometimes different which is how I discovered why the one client's firewall was suddenly refusing the connections.

How can I just make outgoing calls originate from a static IP yet still allow multiple IPs pointing to different sites in IIS?

share|improve this question
    
Just curious: Why is your IIS server connecting to client sites? –  Chris S Mar 10 '11 at 18:24
    
There is a object inside the ASP.NET app that makes LDAP calls to their AD server for authentication against the web app. –  ioSamurai Mar 10 '11 at 18:29
    
This doesn't make sense. It should use the primary ip address bound to the network adapter that the traffic is originating from. When you say that "What's my IP" showed something different, what did it show exactly? –  joeqwerty Mar 10 '11 at 19:15
    
@joeqwerty It just was one IP address one time, and another IP address another time. There are multiple IP addresses assigned to the server. And I am talking about traffic originating from this server. –  ioSamurai Mar 10 '11 at 19:35
    
@joeqwerty you know, now that I think about it I think the change happened after a co-worker of mine added another IP to the machine, I am wondering if when the new IP was added it became the default for the network adapter, that could very well be what happened... –  ioSamurai Mar 10 '11 at 21:12

2 Answers 2

Have a look at the Metric values in your routing table:

ROUTE PRINT

if you have multiple routes for the same destination, the Metric value determines which route and therefore source IP address is used. A lower Metric value is used first.

You can use the PATHPING command to see which address is used.

ROUTE ADD|DELETE|CHANGE allows you to change the routing table including the metric.

share|improve this answer

You could just remove the default gateway from the adapters you don't want traffic to go through. That would allow traffic to come into any adapter but leave only through the one with the gateway configured.

The issue isn't really an IIS thing, it's more of a TCP\IP stack thing. I don't think you can add that functionality to just IIS without affecting everything else on the machine that uses network connectivity.

share|improve this answer

Your Answer

 
discard

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.