Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to use my company's VPN only to manage my emails via exchange (https). Which means I have to redirect the traffic going to https://mail.company.com through my VPN but not the other addresses.

If I go to Network Preferences -> Advanced -> Proxies I see we can bypass proxy settings for a list of hosts and domains, but I want to do the other way: use the proxy only for a list of domains.

share|improve this question
up vote 0 down vote accepted

Short version:
You can add a route for a specific host.

Long version:
If you only use https://mail.company.com/ for this task then you can change the routing table to route all request for this host via a specific interface. In this case via the VPN.

Using the shell the command for this would be something like thing:
route add -host IP_from_mail.company.com IP_of_VPN_gateway
Replace IP_from_mail.company.com with the IP of mail.company.com. If you do not know which IP that is try ping mail.company.com.

This should work until your next reboot.

To add it permanently you need to do some things which I can not test due to a lack os OS/X on my part. Googling seems to point to sudo launchctl load -w /Library/LaunchDaemons/setstaticroute.plist. However this is untested by me since I have no OS/X

share|improve this answer
    
Thank you very much for your reply. But it seems that it not the only problem that I have: my company is the child company of another one. When the proxy is on, I can resolve *.company.com but not *.mom_company.com. And the server is on email.mom_company.com. Would you know what I can setup to be able to resolve email.mom_company.com ? I can setup my email to use the IP address of email.mom_company.com, but Exchange will change it back to a name that I can't resolve anymore without all traffic going through https. I hope I am clear enough... – user149377 Jul 31 '12 at 23:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .