PDA

View Full Version : Route port to certain network connection




tvhargon
Jul 14, 2011, 06:16 PM
I was wondering if it would be possible to have a certain port use one network connection, and have the rest use another. Right now, the WiFi I'm on does not allow Remote Desktop unless I tunnel through my (deathly slow) VPN. I also have the option of tethering with my iPhone, which again, is rather slow. I would like to know if there is a way to route the Remote Desktop ports through either the VPN or the iPhone, and have my normal web traffic run off the WiFi.



tvhargon
Jul 14, 2011, 07:14 PM
Never mind, I subscribed to a high-speed domestic VPN, for times like this.

jtara
Jul 15, 2011, 11:18 AM
No, you can't have a certain port use a different network connection.

First off, ports are always associated with an IP address. There's really no concept of a port without an IP address.

However, you don't NEED to have a "certain port" use a different network connection. What you really want is to reach your desktop computer through a different network connection. That's done through routing. VPN setups usually provide some way to setting up selective routing when the VPN is connected.

You want to route the IP range of your home network through the VPN, while still having the default route use the WiFi router. Setup can be a bit complicated due to the fact that the remote and desktop might have identical IP address ranges, but that can be handled with NAT or simply by changing IP address ranges on your local network(s). (Example: New York office: 10.0.1.x, Los Angeles office: 10.0.2.x, Boston office: 10.0.3.x)

This is the most common way of setting up VPNs, actually, if the remote is in a fixed location (rather than mobile). Let's say you have a computer at home, and you need to connect to your office computer(s). You'd route the IP range of the office computers over the VPN, and default through your home internet gateway.

If you are at Starbucks, or ultra-paranoid, you'd want to also default-route through the VPN, so that all of your traffic to the Internet is encrypted. The downside is the packets have to go through the VPN to your home machine and then exit onto the Internet from there.