When you connect your OSX mac to a VPN using the inbuilt VPN setup - as long as you get the service order correct it should pick up the DNS servers. But it often doesn't.
I've tried lots of articles on the net about this - restarting different processes, changing different configurations - sometimes they work, sometimes they don't (and the ones that worked often don't work the next time).
The script on this post is so far the only way I have found to reliably get a DNS lookup to work.
Just in case the post is unavailable in future - here's a local copy of the script - just remember to replace the VPN name with your VPN name.