Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am working on customer's site and here i have a very restricted lan (no gmail, no corporate mail) but i need the lan for som services (intranet, svn, jira...).

My laptop has a built in SIM with 3g. Is there any way to use both connections at the same time and configure the route to take by ip/url? My first try was to manipulate the provided pac file and add some proxy exceptions:

...
function FindProxyForURL(url, host){
 ...
 if((shExpMatch(url, "*mail.google.com*"))||
    (shExpMatch(url, "*myCompany.com*"))||
    ...
    return "DIRECT";
...

But this is not working. For gmail i get an dns error (gmail could not be resolved) and outlook can't connect to my company's exchange server. So is there any way to get both to work at the same time (without unplugging the lan and reconfiguring the proxy settings each time?)

(My machine has windows 7 64bit pro)

share|improve this question

1 Answer 1

up vote 3 down vote accepted

In situations like this I usually use static routing towards the company sites, and use the alternative connection as default gateway. Was a while since I did this on Windows so my apologies if the syntax is not 100% correct.

List your current routes, just for reference.

print route

Syntax for add a new static route, gateway is the key here. Use the gateway for the interface you would like to connect through.

route add <destination> mask <net-mask> <gateway>

Here's an example for a single host, and a range.

route add 192.168.10.67 mask 255.255.255.255 10.6.10.1
route add 192.168.8.0 mask 255.255.255.0 10.6.10.1

And now you're good to go. This is not saved after reboot, so making it to a script could be handy. And for some further reading on the subject, have a look here.

UPDATE

To change your default gateway you could use the route command as well. In your case you would like to use the gatway of your 3G connection.

route add 0.0.0.0 mask 0.0.0.0 <gateway>
share|improve this answer
    
thx, but could you please explain it a little more. i miss the connection to my situation: do i need to activate the proxy or not (pac.file or manual)? how to set the 3g connection to default? In your example is "10.6.10.1" the proxy and 192... some company ips? –  dermoritz Jun 21 '13 at 5:54
    
No, you should not use a proxy at all in this case. Proxy is in general used more per application. The IP numbers I use is just some that I picked and is not related to your specific situation. I'll update my answer with how to set a default gateway. –  Intenso Jun 26 '13 at 13:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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