Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm using Palo Alto Netconnect to connect to a remote system. I'm using it from OSX. When the netconnect app starts, it overrides my DNS settings, so while I'm still able to ping the internet using ip addresses, host names are not resolved anymore.

Since I don't need name resolution on the VPN, but instead I need to connect to the internet while connected, how can I prevent Netconnect to override my DNS settings?

Under linux, simply changing /etc/resolv.conf is enough. Under OSX however, changing /etc/resolv.conf only affects dig, nslookup etc.. but not the rest of the system (there is an explicit note about this in dig and nslookup man pages).

The Network Preferences panel does not see the netconnect connection, there is no visible dns change there, it still lists only my main internet connection with correct DNS settings. So, how do I override the DNS configuration under OSX?


P.S. OSX 10.6.8

EDIT : Thing I've already tried

1) Modifying resolv.conf, all of them (there are three, but two are symbolic links). /etc/resolv.conf is used by many command line utilities (like dig, nslookup, host etc...) but not by the "main system", that is nearly every application (browser, messenger, even command line ping and traceroute) can resolve host names.

2) Stopping and restarting mDNSresponder and some other services after the connection, hoping they "reloaded" the right configuration.

3) Hardcoding DNS servers, hardcoding them after the netconnect connection hoping to "overwrite" the faulty netconnect configuration.

4) Reconfiguring the dns server via command line, using networksetup -setdnsservers, while connected to the netconnect vpn

5) Creating /etc/resolver/ file, with "nameserver ip.of.name.server" and "domain ."

Still nothing working.

share|improve this question
One option would be to connect to the VPN in a virtual machine, ensuring that your host operating system's settings are not altered. This is standard procedure for service providers that have to connect to multiple foreign networks using client-provided proprietary VPN clients. –  Skyhawk Jul 18 '12 at 17:53
Hi Miles, yes I also do that with some other VPN systems, especially those supporting only Windows. However, using 2gb of ram for an entire os simply because there is no way to override a dns settings ... it's worth asking for a solution :). –  Simone Gianni Jul 18 '12 at 22:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.