Run a program over specified network?

0

Is there a way in Windows 10 (or anything 7 & up) to specify what network connection a program uses? Specifically, to have all my programs running through Ehternet except RDP over WiFi? I've already specified that Ethernet is the priority/default adapter, but I need RDP to run on WiFi due to firewall restrictions.

Chad Quinlan

Posted 2015-11-30T19:39:08.060

Reputation: 1

I am a little confused here. Are you trying to run a program on a computer from a different computer? Or are you RDP to the computer the program is on to use it? – JukEboX – 2015-11-30T19:44:32.503

Can you be much more precise about what you mean by "specified network"? Your question asks about networks but then your description talks about adapters. Is this computer on two different networks with two different IP addresses? If so, then assuming the computer is properly configured for a dual-network configuration (which is unlikely, but obviously has to be done first) then it should "just work" so long as you use the correct IP address in the program. – David Schwartz – 2015-11-30T20:43:40.577

Possible duplicate of How can I force Windows 7 to use specific network adapters per program?

– Ƭᴇcʜιᴇ007 – 2015-11-30T21:07:36.847

I am trying to RDP to a computer that is external to my network. Due to a broken firewall and no administrator, I need a workaround to get past the RDP protocol block, to perform my job. Thanks for the replies; I'll take a look at the other threads and the program mentioned. – Chad Quinlan – 2015-12-03T21:57:39.150

Answers

2

No, not unless the IP layout of the network allows you to set up IP routes to the RDP destination that exit out the second nic.

Generally speaking, Applications do not know their NIC, just the destination IP address they want to communicate with, so they leave the details of how to reach the remote host to the OS. The OSes IP stack will handle the details of routing, including the exit interface used to contact a given address.

If RDP is the only way you will ever contact a remote station, you can create a persistent route to that device using a particular exit interface and cost metric, which should do what you want, but with the caveat that every IP connection to that station will always take that route.

In Windows, the route -p add <routeinfo> command can create a persistent route. To set up a route to 10.0.0.2 from the nic assigned 10.0.0.3, you would use something like:

route -p add 10.0.0.2 mask 255.255.255.255 10.0.0.3 metric 1.

Because the route is to a very specific destination, and has a low metric, this route will be selected to reach 10.0.0.2 every time, unless there exists another route with the same specificity and metric.

Frank Thomas

Posted 2015-11-30T19:39:08.060

Reputation: 29 039

Thanks for the reply. It is a single, specific destination IP that I'm trying to RDP to, so the route command may do exactly what I need. Thanks! – Chad Quinlan – 2015-12-03T21:56:38.780