{"id":316,"date":"2007-10-06T15:27:32","date_gmt":"2007-10-06T20:27:32","guid":{"rendered":"http:\/\/www.mccambridge.org\/blog\/2007\/10\/correct-way-to-set-up-openvpn-client-on-mac-os-x\/"},"modified":"2022-09-11T00:40:40","modified_gmt":"2022-09-11T00:40:40","slug":"correct-way-to-set-up-openvpn-client-on-mac-os-x","status":"publish","type":"post","link":"http:\/\/www.mccambridge.org\/blog\/2007\/10\/correct-way-to-set-up-openvpn-client-on-mac-os-x\/","title":{"rendered":"Correct Way to set up OpenVPN Client on Mac OS X"},"content":{"rendered":"
You want to run an OpenVPN Client on Mac OS X. Your OpenVPN server will be serving DHCP, as well as pushing down DNS server addresses. You’ve tried connecting, and it just doesn’t seem to work. Perhaps you even see a large number of errors of the type:<\/p>\n
write to TUN\/TAP : Input\/output error (code=5)<\/p>\n
When you connect via OpenVPN, it is the responsibility of the client to process pushed However, this does not work on a Mac, because Mac software (even down to The best solution is to run an “up” script as part of the OpenVPN connection process, which will handle the necessary configuration for you. The script<\/a> is provided on the Openvpn-users mailing list, by Ben Low.<\/p>\n Here’s how to use it with the excellent OpenVPN client Tunnelblick<\/a>:<\/p>\ndhcp-option<\/code>s (including the DNS server rules), and do something useful with them. On a linux system, you could, for example, incorporate these into
\/etc\/resolv.conf<\/code>. Consult your distro’s openvpn documentation for more information.<\/p>\n
ssh<\/code> and
ping<\/code>) doesn’t use
\/etc\/resolv.conf<\/code> under OS X 10.4… Oops. The solution? A combination of two tools:
ipconfig<\/code> and
scutil<\/code>. These together can manage 10.4’s new DNS configuration system, and set the tap device to obtain an address via DHCP. The problem is discussed further<\/a> on nicholas riley’s blog, though his solution, a python script, a) is complicated to install, and b) did not actually work for me once installed, though I didn’t dig deep enough to understand why.<\/p>\n
\n
~\/Library\/openvpn<\/code>, the folder where your Tunnelblick OpenVPN configuration lives.\n