3

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 10.0.0.0/8 <intranet gateway>.

However, there are a number of intranet sites that have their own DNS; i.e., hr.company.com 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?

1
  • Is it also possible to send all ssh traffic over wifi?
    – BTR Naidu
    Jun 10, 2016 at 14:56

3 Answers 3

2

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: http://en.wikipedia.org/wiki/Proxy_auto-config

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.

1
  • 1
    Looks like Locations is the right thing - I have to manually add a DNS server regardless.
    – Dan
    Jul 28, 2010 at 22:52
3

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/domain.com to specify valid nameservers for that domain using the terminal.

http://blog.scottlowe.org/2013/08/14/using-your-home-dns-servers-with-corporate-vpns/

1
  • Wow it really did the trick. However tools that use their own DNS resolution like dig don't use this file, but this is usually not a problem.
    – bric3
    May 29, 2017 at 10:58
-1

since i am not allowed to comment i have to add another answer.

mike's pac file solution has one catch though: in my understanding pac files need to be hosted on a server as they are accessed via an url. unless you have access to a server or turn your own computer into a server, this is generally not easy to do.

4
  • If you cannot comment then you should refrain from submitting a comment entirely until you have earned the privilege of doing so.
    – Ramhound
    Oct 19, 2017 at 14:29
  • i believe to have made a viable followup comment on the subject. shutting up is your suggested solution? up/down votes should be reserved judging technical merit not for personal hostilities.
    – hauns
    Oct 19, 2017 at 16:01
  • I issued a downvote because you submitted a comment as an answer to a question. I have absolutely no hostilities towards you, my vote has nothing to do with anything, except the fact I don't find comments submitted as an answer to a question to be helpful. My first comment was an attempt, perhaps failed attempt, to explain that you should refrain from submitting comments as an answer to a question. Answers should only be used to answer the question, which you have already done, in your existing answer.
    – Ramhound
    Oct 19, 2017 at 16:04
  • I should add that anything that isn't an answer submitted as an answer is likely to be deleted by the community. You don't want the community to delete answers that you submit. If i have offended you in any way, then I apologize, but commentary shouldn't be submitted as an answer.
    – Ramhound
    Oct 19, 2017 at 16:07

You must log in to answer this question.

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