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.

1 Answers1

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
  • 37,476