Route only some traffic over VPN

2

I would like only some programs/ports (namely IRC) from my Windows 7 computer to send traffic through a VPN while the other programs (web browsing, FTP, etc) should default to not using the VPN and send data over my ISP like normal.

Is this possible to do on my Windows 7 computer or do I need to run something on my router? If possible, what is the best way to go about setting this up?

block14

Posted 2013-04-22T15:00:55.530

Reputation: 320

It is difficult to segregate outgoing connection by ports unless you have a linux-based router which you can take full control over. Would it suffice to route traffic based on target IP address (the IP address if your IRC server, for example)? All major OSes provide simple support for doing that. – Darth Android – 2013-04-22T15:03:19.357

Unfortunately I connect to multiple IRC networks where we do DCC (essentially Peer2Peer connection). To keep adding these to a routing table would be a pain. This is why I would like to base the routing on port number. I only have a Linksys E4200 so I don't think that's going to help much? Edit: I may end up just setting up another box to use for only IRC and just remote into it. – block14 – 2013-04-22T15:09:12.143

You might be able to make it work with the E4200 and DD-WRT, but that would require you to be comfortable with flashing the router with custom firmware. You would need to be able to get iptables and ip routing up and do something like this: http://unix.stackexchange.com/questions/21093/output-traffic-on-different-interfaces-based-on-destination-port?rq=1

– Darth Android – 2013-04-22T19:34:29.223

You might want to consider running a Virtual Machine. Let the Virtual Machine get trapped in the VPN and the host should be fine. – cybernard – 2013-04-23T01:25:50.393

No answers