Force traffic sent to a specific IP address (through RDP) to a specific network interface

11,041

You would want to set up a route for static IP with a netmask of 255.255.255.255 and a gateway of 12.11.10.9:

route add yourSpecificStaticIP mask 255.255.255.255 12.11.10.9

This will route traffic to yourSpecificStaticIP over the iPhone network interface. You will need to remove the route if at any point you do not want to use the iPhone, and you will need to recreate the route any time you reboot your machine, unless you use the persist (-p) option.

Share:
11,041

Related videos on Youtube

Alex Karpowitsch
Author by

Alex Karpowitsch

Updated on September 18, 2022

Comments

  • Alex Karpowitsch
    Alex Karpowitsch over 1 year

    How might I force traffic to a specific IP address through a particular network interface, in Windows?

    After a bit of rudimentary Googling, this question comes close to answering my question, but my situation is a bit different - https://serverfault.com/questions/92575/how-to-route-different-traffic-thru-different-network-interfaces-in-windows

    I'm a bit confused by his question/answer because I'm not quite sure how I would identify which interface has the higher metric.

    Usage case - I have an iPhone 5 w/LTE connectivity, and I want to use RDP to connect to a specific (and static) IP address. All other traffic, as usual, should travel through the corporate LAN, but initiating an RDP connection to this particular IP address (my home computer) should use the iPhone's network adapter interface.

    How might I accomplish this with the route command?

    some example IP addresses:

    My corporate LAN IP - 192.168.100.1 My iPhone 5 IP - 12.11.10.9