Tunnelblick does not update /etc/resolv.conf after a new ethernet connection is made on MacOSX El Capitan

1,063 views
Skip to first unread message

xaba...@gmail.com

unread,
Feb 12, 2016, 11:03:57 AM2/12/16
to tunnelblick-discuss
Hi, 

When I plugin ethernet (over USB) on my Mac, I get the DNS information from some router on the other end, which might or might not be a bad thing. 

Tunnelblick 3.6beta10 (build 4400), however, doesn't notice this and as a result the VPN provided DNS servers are overwritten in /etc/resolv.conf, which means that I need to manually restart Tunnelblick to make everything work again. What is the suggested method to run Tunnelblick such that I don't experience this issue?  


Cheers, 
0xAB

jkbull...gmail.com

unread,
Feb 12, 2016, 11:26:31 AM2/12/16
to tunnelblick-discuss
First, let me clear up a misunderstanding: under OS X, only a few command-line commands like "ping" use /etc/resolv.conf. The rest of the system (apps, Software Update, etc.) use the System Configuration database. /etc/resolv.cof is considered "read only" by OS X, and is regenerated by OS X when OS X detects a network change.

But I don't think the problem you are having is just that /etc/resolv.conf; I think that the system is actually using the new DNS server(s).

Let me see if I understand your situation: You are connected to a VPN via WiFi using DNS server A at your VPN provider, and you plug in the Ethernet cable, which, via DHCP, sets the DNS server to B which is not at your VPN provider. Then DNS queries are being directed to B, which is not what you want.

If you have "Monitor Network Settings" checked on the 'Configurations' panel of Tunnelblick's 'VPN Details' window, Tunnelblick will deal with this. It will restore the DNS settings and other settings changed by DHCP if they are changed to the pre-VPN values, or it will restart the connection if they are changed to something else. Some rare situations call for more fine-grained control than that; you can use the 'While Connected' tab of the 'Advanced' settings window to specify in more detail what should be done when a network change is detected.

I could be wrong about this, but as I remember,  a "restart" of the connection may not be a full restart -- it depends on your OpenVPN configuration. I think it if you have "persist-tun" in the configuration, it is not fully restarted, but only partially restarted. That may be what is happening to you.
Reply all
Reply to author
Forward
0 new messages