Solved

Using Multiple IPs With Windows 2003

Posted on 2006-12-01
30
3,392 Views
Last Modified: 2013-12-23
I currently have my Windows 2003 server setup with three different IP addresses.  Let's call them A, B, and C.  I have a proxy server which I can setup to listen to all three IP addresses, but it will only sent data out on IP A.  Even if a client connects on IP C or B, it will still be sent through A.  How can I setup a proxy daemon which will listen to A, B, and C and send data from the address which the client connected to?
0
Comment
Question by:Fapiko
  • 11
  • 7
  • 6
  • +3
30 Comments
 
LVL 4

Expert Comment

by:Trilotech
Comment Utility
The obvious question is what proxy software are you using?

P.S.
This is the Windows NT Channel...
0
 
LVL 3

Author Comment

by:Fapiko
Comment Utility
CCProxy.  And uh, posted here because Windows Server 2003 is part of the NT family.
0
 
LVL 4

Expert Comment

by:Trilotech
Comment Utility
Sorry lol - thought there was a specific Win2003 Channel...

Are all three addresses public addresses or on the same subnet?

0
 
LVL 3

Author Comment

by:Fapiko
Comment Utility
They're on the same subnet.
0
 
LVL 4

Expert Comment

by:Trilotech
Comment Utility
I am not that familiar with CCProxy. Unless there is a way to specify it in there then general network routing is going to apply.

All outbound traffic will rely on your routing tables. Unfortunately with them all being on the same subnet then your adapter bindings will determine which one. This is not dynamic, so it will always be the top one on the list until it has to rollover to the second one because of an issue.

Why do you have three on one subnet? Are you looking for performance gain? You will have to configure some load balancing to do this. Otherwise, the above will occur.

Anyone know if there is a setting in CCProxy specifically?
0
 
LVL 3

Author Comment

by:Fapiko
Comment Utility
No there's no setting in the program specifically.  I just put them all in the same subnet because that's what my host told me to do.  I know on Linux you can create multiple eth adapters but didn't know if there was any way to make a virtual network adapter or something of that sort?
0
 
LVL 13

Expert Comment

by:masterbaker
Comment Utility
If they are all on the same subnet then Windows will just use the NIC that is highest in its order list.  This is just the behavior I would expect to see when you have multiple physical adapters connecting to the same subnet.  Personally I'm not a fan of connecting more than one NIC to a particular subnet unless you are setting up some kind of channel bonding for performance and/or redundancy, but that usually requires additional software to manage this type of connection appropriately.

Sorry I don't have a better answer for you!

Jeff
0
 
LVL 3

Author Comment

by:Fapiko
Comment Utility
Well, how would I properly go about setting them up on different subnets?  As I said, I was just doing it as my host told me to do.  I'm open to links to a website that will teach me the "proper" way to setup my IP addresses :P
0
 
LVL 4

Expert Comment

by:Trilotech
Comment Utility
It comes down to what you want to accomplish by using multiple nics. If it was for a performance gain then you should look into some kind of load balancing. Creating multiple subnets may NOT be what you want. It all depends on what it is you want to accomplish. So, why are you using multiple nics in the first place?

Also, sounds like right now it is probably fine. I mean, having the multiple nics on the same subnet IS load balancing a little bit of traffic (incoming if configured for different ips on clients) and gives you a roll over in case one of them has a problem...
0
 
LVL 3

Author Comment

by:Fapiko
Comment Utility
What I want to accomplish is being able to use the three IP addresses individually as the question above states.  It's all going through one NIC.  I tried changing it so each IP address was on a different subnet, but that didn't help at all.  All outbound packets were still sent through the first IP address.
0
 
LVL 4

Expert Comment

by:Trilotech
Comment Utility
but WHY do you want to have it use all three nics...
0
 
LVL 13

Expert Comment

by:masterbaker
Comment Utility
Fapiko,

Again, what you are seeing is normal Windows behavior.  It will continue to send the packets out through the first IP address always.  The only way to overcome this is to develop an application that is "IP address aware" and will respond based on the IP address the incoming request was on.  This is not something that normal Windows applications will do as the need for this sounds very unique.

As for setting up different subnets, that all depends on how your network environment is configured.  If you are doing this over one NIC then you most likely would not want separate subnets as the clients on your one network would then be broken up into three separate groups and, well, without going into too much detail it would probably have a major negative impact on the overall system usability.

Jeff
0
 
LVL 3

Author Comment

by:Fapiko
Comment Utility
Last I knew it was Windows that decided which IP address to send data through and not applications.  If it really is the application which decides, although I'm 90% sure it's Windows which decides which IP address on the NIC gets used, I would simply write my own proxy server to use.
0
 
LVL 13

Expert Comment

by:masterbaker
Comment Utility
Yes, Windows does decide which IP to use.  My point was that you may be able to craft an application that changed the default behavior, but I'm guessing that is far beyond the scope of this effort.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 3

Author Comment

by:Fapiko
Comment Utility
Well, I guess what I should be asking now is if anybody knows a way to setup a virtual NIC for each IP address I wish to use seperately.  Any ideas?
0
 
LVL 13

Expert Comment

by:masterbaker
Comment Utility
Well, I still think you are going to run into the same problem if you use the same IP subnet for each of your connections.  Windows will jump in and send everything back out through one network connection.  If you configure your client computers for three separate IP subnets (such as 192.168.0.0/24, 192.168.1.0/24, and 192.168.2.0/24) then set up IP addresses on your server for each ones of these subnets, that's when Windows will respond back using the IP the clients used to talk to it.  That's pretty much the only way this can be done.
0
 
LVL 13

Expert Comment

by:masterbaker
Comment Utility
Another way around this would be to install Virtual Server and build 2 additional virtual servers that also ran this application.  You could have each of the two virtual servers, plus the host server, running your app with just one IP address set up on each.  This might cause some performance issues though.
0
 
LVL 4

Expert Comment

by:Trilotech
Comment Utility
I am still having a hard time understanding why you want it so badly to use all three nics...

How many computers are on this network?
0
 
LVL 3

Author Comment

by:Fapiko
Comment Utility
It's one server.  One NIC.  I want to use all three IPs for the proxy.  I do bot development for services such as AIM, MSN, and Battle.Net and if something goes wrong, I get IP banned for a short amount of time.  I have three IP addresses on my server.  If I can use all three of them, I can get get past the ipban until it lifts and keep testing.
0
 
LVL 13

Expert Comment

by:hstiles
Comment Utility
All that is happening is this

Say your machine has the IP configuration as below

NIC1 - 192.168.1.2 SM 255.255.255.0 GW 192.168.1.1
NIC2 - 192.168.2.2 SM 255.255.255.0 GW 192.168.2.1
NIC3 - 192.168.3.2 SM 255.255.255.0 GW 192.168.3.1

Your server has 3 NICs assigned, on three different subnets with 3 different default gateways.  It will, however, only use one of these at a time

A quick route print on your server will tell you which of the gateways is being used as default

A simple, if somewhat inelegant method of switching ISPs would be to create three simple route scripts to delete the one default route and add another

route delete 0.0.0.0 192.168.1.1
route add 0.0.0.0 192.168.2.1

route delete 192.168.2.1
route add 192.168.3.1

you get the idea.




0
 
LVL 13

Expert Comment

by:masterbaker
Comment Utility
Maybe what you need to do is just put together something that solves your problem but doesn't address your initial request (as it isn't possible given Windows' behavior).  What you could use is a tool like NetSetMan to quickly and easily change your IP address.  So what you could do is configure your single NIC with one IP address.  When that IP gets blocked, run this tool to switch to your secondary IP.  Then run it again for your tertiary IP address.  You can create up to 5 different configurations with this tool.

There are also other ways to script the IP address change, such as using netsh.  Maybe you could write a script that changes your IP address and then have it run as a scheduled task every 10, 20, or 30 minutes (or however often you want)?  

Just throwing out other ideas to think about.

Jeff
0
 
LVL 3

Author Comment

by:Fapiko
Comment Utility
The problem is I'm also running a webserver and other services.  And to clarify, for those who keep thinking I have three NICs,

I only have 3 IP addresses.  There is only one network interface card.

So please stop offering suggestions on how to work it with three different NIC cards unless you can tell me how to emulate NIC cards like VMWare does.
0
 
LVL 13

Expert Comment

by:masterbaker
Comment Utility
Well then I think you may be out of luck given your setup.  There just isn't any way to force outgoing packets to use a particular IP address.  Even if you added the two other NICs you would still have the same problem.
0
 
LVL 3

Author Comment

by:Fapiko
Comment Utility
I did it on a Plesk box once where Plesk had installed a virtual NIC.  If I used an IP address from NIC A, IP A would be used.  If sending packets from NIC B, it would use IP B.  I just need to know how to set up a virtual NIC.
0
 
LVL 3

Author Comment

by:Fapiko
Comment Utility
The solution I found was to install a bouncer typically used for IRC.  It allowed me to bind outgoing packets to a specific IP address.
0
 
LVL 51

Expert Comment

by:Keith Alabaster
Comment Utility
OK, Thanks :)
0
 
LVL 51

Expert Comment

by:Keith Alabaster
Comment Utility
KB, this question is already part of the cleanup process but if you want to do it... Happy new year by the way

KA
0
 
LVL 1

Accepted Solution

by:
DarthMod earned 0 total points
Comment Utility
PAQd, 150 points refunded.

DarthMod
CS Moderator
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

The Need In an Active Directory enviroment, the PDC emulator provide time synchronization for the domain. This is important since Active Directory uses Kerberos for authentication.  By default, if the time difference between systems is off by more …
This article offers some helpful and general tips for safe browsing and online shopping. It offers simple and manageable procedures that help to ensure the safety of one's personal information and the security of any devices.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now