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

When I'm at work, I access various intranet pages as well as the wider Internet through ethernet. However, the company LAN blocks some ports (e.g. Google Calendar). I can get to those through WiFi. So, I gave the Airport priority, and then using route add, I set up selective routing: all intranet traffic goes through the ethernet and everything else via WiFi: sudo route add <intranet gateway>.

However, there are a number of intranet sites that have their own DNS; i.e., only resolves on the intranet. The only way that I can get the DNS to work properly is to add the internal DNS server to the Airport DNS listing, however I fear that when I go elsewhere and forget, this will break things.

What's the right way to get the DNS to resolve using this setup?

share|improve this question
Is it also possible to send all ssh traffic over wifi? – BTR Naidu Jun 10 at 14:56
up vote 2 down vote accepted

Your situation is a fairly common one in large organisations. In this situation, you should use a Proxy Configuration File (set this in System Preferences > Network > Advanced... > Proxies > Automatic Proxy Configuration).

You'll have to create your own PAC file and host it somewhere but it's fairly simple Javascript and Wikipedia has a few examples:

Another thing you may have to add is a setting in System Preferences > Network > Advanced... > DNS. You can add a DNS server here to manually add the domain in here.

You can also set these configurations per-location by adding Locations in the System Preferences > Network > Locator combobox.

share|improve this answer
Looks like Locations is the right thing - I have to manually add a DNS server regardless. – Dan Jul 28 '10 at 22:52

i finally found a solution to my and dan's problem: dns servers can be cleanly managed on a per-domain basis using the built in resolve functionality. just provide file(s) /etc/resolver/ to specify valid nameservers for that domain using the terminal.

share|improve this answer
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post. – Moses Aug 22 '14 at 19:22

You must log in to answer this question.

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