Here is my situation: I am running Tunnelblick on my MacBook (running Mavericks) to connect to my own VPN, which comprises several machines, both at home and at remote locations. I can of course use the VPN-internal addresses to enable communication between my MacBook and other machines but I would like to prefer local addresses for a machine, if possible.
I have a server that is running an AppleTalk daemon for Time Machine. This server is part of the VPN and as thus it’s reachable under a 10.x.x.x IP address. However, when I’m at home I would like to use the local 192.168.x.x IP address so that traffic doesn’t have to go over the internet (and my rather smallish outbound bandwidth). Currently I edit
/etc/hosts every time I arrive at the office or at home to facilitate the switch.
Is there any way to have this switch happen automatically?