<p>I’m using OpenVPN through Tunnelblick on MacOS X Lion.</p>
<p>I need to set specific DNS (with local IP, which works only when VPN is up) for the duration of this VPN session only.</p>
<p>I <strong>do not have access to the OpenVPN server configuration.</strong> Only client config. Also, DNS from the server <strong>doesn’t work.</strong></p>
<p>So it works like this: I connect to VPN, go the Network preferences and manually set DNS.<br>
After VPN is disconnected, I switch back to default. It works, but it needs to be <strong>automatic.</strong></p>
<p>After some exploration I found that OpenVPN up- and down- scripts might help me with that. Unfortunately, I haven’t found any specific documentation about how exactly it can be done.</p>
<p>How it can or can’t be done? Any advice would be appreciated!</p>