Posts

vpnc-script returned error 1 resolv.conf mac osx

Recently on my MAC OSX i rebooted and when I tried to start my vpn using vpnc i got the following error:

Which basically rendered the vpnc-script useless in order to resolve this you need to do the below:

then try starting the VPN again, hopefully should fix this, any issues please comment.

Append search domains not working Apple MAC OS X Yosemite 10.10

I experienced this problem when I upgraded to Apple MAC OS X Yosemite 10.10 you also need to ensure you are running 10.10.1 Update DNS Append Search failed to work. Example if you have your own domain as “company.net”, and you want to ping a host called “demo.company.net”, you can just use the (non-qualified) hostname “demo”.

If you have a host called app01.corp.company.net, weather or not you can use “app01.corp” as a shortname depends on how your operating system is configured.

In Mac OSX (Yosemite), the DNS resolution won’t work as it doesn’t append the search domain. If the hostname you try to use has a . in it, OSX will always assume it’s a FQDN, and won’t try to append your default search domain.

There is a easy way to fix this behaviour follow the instructions below and have fun.

Here we go:

  • Backup /System/Library/LaunchDaemons/com.apple.discoveryd.plist
  • Edit com.apple.discoveryd.plist to include the “–AlwaysAppendSearchDomains” setting. You can use any text editor you like, just don’t forget to use elevated privileges via sudo. If you know vi(m), or nano:

  • You need to add –AlwaysAppendSearchDomains to the ProgramArguments array. In my copy, it was around line 11. Eg:

  • Reload the discoveryd service:

  • Append DNS Broken in OS X El Captain

    here’s how to fix it: