|
|
You can use remote DNS - here's how
There are several problems with putting static entries in your hosts file. I used to find myself always checking in via Remote Desktop with a known windows server to look up addresses. Fortunately, there is a way to use local DNS servers.
There is a mechanism called 'resolver' where you can specify custom DNS settings for individual domain names. You'll need to open Terminal to carry out these instructions, and to know the name of the domain you want to look up domain names on. For this example, I'll use 'acme.com', just replace it with your company's internal TLD. (1) Create a directory as root called 'resolver' in /etc/ sudo mkdir /etc/resolver(2) Now create a file named after your internal network's domain name with '.x' on the end. For the example, I'm using 'acme.com', change this to your name sudo pico /etc/resolver/acme.com.xThis is important: if you name it 'acme.com' without the .x, OSX will *always* use these DNS settings. We're going to do a little trick to activate & deactivate the settings every time you connect to your VPN. (3) Put the following settings into this file: search acme.comChange 'acme.com' to your internal domain name. You can get the nameserver addresses by typing the following the next time you are actually in the office: cat /etc/resolver.confOther options include: asking your sysadmin nicely; connect to a known Windows box using Remote Desktop and typing 'ipconfig /all' in a Command Prompt. (4) Now here's the magic: we're going to edit /etc/ppp/ip-up and /etc/ppp/ip-down to activate and deactivate the domain names each time you connect & disconnect. sudo pico /etc/ppp/ip-upip-up should contain the following: #!/bin/shNow for ip-down: sudo pico /etc/ppp/ip-downwhich should contain the following: #!/bin/sh(5) Final step (important!): get the permissions right sudo chmod +x /etc/ppp/ip-upNow give it a try. When you connect, a second file should appear in resolver called 'acme.com', and this should disappear when you disconnect. Check /tmp/ppp.log for more details if you have any problems. Good luck!
minor correction
I suspect that in the ip-down script you want to remove /etc/resolver/acme.com and not acme.com.x
minor correction - thx
Yes, that's right, thx :-)
You can use remote DNS - here's how
This works perfectly! I no longer have to choose between *either* using static IPs for all the machines on the VPN *or* routing all my traffic through the VPN connection.
On another note, I've also added a line to the ip-up script to lower the mtu for pptp connections. I'm hoping this will cure the instability of smb shares and remote desktop over the vpn:
700 is the mtu size used by DigiTunnel (a third party VPN client) so I figure it's a good place to start.
You can use remote DNS - here's how
Correction:
|
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.18 seconds |
|