I'm using my work computer with access to all my work stuff (database, apps, mail...) and I have limited Internet connection, with some blocked sites.

Fortunately, I have my Android device which I use to tether my 3G connection to my PC. The bad thing is that when I create that network between my PC and my phone, I lose absolutely all connection to my work things, no mail, no database, etc..., so I have to switch between those 2 connections to work or use Internet.

Is there a way to use both connections and don't switch between them?


You can use the command route in a command prompt to change how windows routes traffic to your different network cards.
More info here

For example, if your "work" network card has the gateway you can do:

route add mask

This will redirect all request to your local "work" network (in other words 10.x.x.x) to your "work" network card. Of course you need to adapt to your network configuration.


qwertzguy is right, but you may need more information.

Your issue stems from the default gateway being set when connecting to the two networks. The default gateway is what telss your computer how it gets to any IP network it is not directly connected to.

When you connect to your work network, and do ipconfig in a cmd prompt, you'll see default gateway set. When you connect to the android phone, you'll have another default gateway set, which is probably getting priority over the first. In ipconfig you'll see that you have an ip address and a network mask. For any IP address that does not fall within this network your computer will attempt to connect to it via the default gateway. Your email and file servers at work are very likely not on the same network as you, and so will be access via the default gateway. As your android phone sets a default gateway it will attempt to connect to them via your phone. This will clearly not work.

In order to use the route command, you need to know the ip address ranges that your work uses, and ensure they are routed to the gateway that your work connection sets. Given that they most likely use private address ranges, the following routes will probably cover all scenarios:

route add mask <work gateway IP>
route add mask <work gateway IP>
route add  mask <work gateway IP>

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.