I have a Windows XP machine in remote location on which I need to debug an application.

It has two LAN cards both with internet access on different subnets. Problem is related to LAN card A. How can I force Remote Desktop (port 3389) through the other LAN card B only and make sure that all other trafic go via LAN card A.

Is it possible to set some static router rules somewhere in WinXP?



I think the answer to this is, if interfaces A & B are on different subnets, they have different IP addresses. If that's the case, then you can use B's IP address when connecting with RDC, instead of the computer name. This should guarantee that interface B gets the connection instead of A.


All Remote Desktop and only Remote Desktop? You can't, not automatically. When the computer is deciding what device to send it out, it looks at the routing table, which is just a set of IP addresses. You'll therefore need to make sure that any IP addresses you'll want to RDP to are in the set of routes that go out card B. I'd encourage you to set your IP addresses and subnet masks this way, but you can cheat it by adding a static route as described on Microsoft's KB.


Are you trying to route out going traffic, or incoming traffic?

For Windows itself you can setup static routing rules (ROUTE ADD), however these won't apply to specific ports, and it only applies to outgoing traffic (incoming might use another route if it has already been discovered by outside equipment).

This really sounds like something you'll need to do on a switch (a managed switch, that is one that you can actually login into and program), or possibly on some models of router that support advanced traffic configuration.

One work around you might consider, if you are trying to connect to this computer from the outside (rather then run a connection from it) and this is a home setup, is to configure the port forwarding on your router to send traffic on that port to the IP address of the second card (you'll need to manually setup the IP of that card instead of using DHCP).

Alternatively a Linux computer running as a gateway could make it possible, but that would really just be a very expensive managed switch.

  • or reasonably cheap; depends on how experienced you are in setting up linux, and how easily you can scrounge up some working hardware to do the job. nothing fancy or top-of-the-line needed. – quack quixote Oct 4 '09 at 16:14

This is in fact something very buggy in XP... it doesn't work.

I have tested a situation with Nic1 connected to our LAN and Nic2 connected via WAN connection to a customer's LAN. Seperate IP range, good subnet masks, good & different dns suffixes and DNS server adresses.. and still XP will always try to connect through the Nic that handled your logon.

I even did a crazy test: reboot, logon, then swap LAN cables between the 2 cards: then it works... until you reboot/logon again, then you should swap cables again.

Buggy multiple network handling in XP... will perform the same test in Windows 7 now :-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy