
The Display DNS macro puts the current DNS address onscreen, but also includes some logic to test whether it's set correctly or not. Note that if you don't use wifi, you'll need to replace Wi-Fi with the name of the network service you do use the command networksetup -listallnetworkservices will display the names of your installed network services. I always manually set the DNS address on my laptop, though. Note: If you're using a server-provided DNS address, then you can't get its address with this command. You can also see the current DNS address with networksetup -getdnsservers Wi-Fi, which is how I display the current DNS address. Replace 1.2.3.4 with the address of the DNS you want to use. Networksetup -setdnsservers Wi-Fi 1.2.3.4 Once the state returns CONNECTED, I can then switch the DNS address, using the UNIX side of macOS: I execute the AppleScript once every second, and check what it returns. I use this with Keyboard Maestro's Execute Action Until Conditions Met command to repeatedly check whether the VPN is active (or inactive, for disconnect) here's how that step looks in the Connect macro: They also set the DNS address, based on whether the VPN is active or not.īut how can I tell when the VPN is active? Tunnelblick includes an AppleScript command to get the state of the connection: The Connect and Disconnect macros use Tunnelblick's AppleScript support to, well, connect to and disconnect from the VPN. I wound up with a set of four macros: Connect, Disconnect, Display DNS, and Toggle DNS. So I included DNS address switching in my macros. Technically, the DNS address shouldn't have to be switched-I have the VPN and Tunnelblick configured to automatically switch on connect, but for whatever reason, it's just not happening. Using that support and Keyboard Maestro, I wrote a few macros to simplify connecting to and disconnecting from our VPN, as well as changing the DNS address depending on whether I'm connected to the VPN or not. Thankfully, TunnelBlick includes AppleScript support. But doing this several times a day gets annoying quite quickly. Launch the app, activate its menu bar item, choose your VPN connection profile from the list, enter your password, and you're connected.

To access the VPN, I use TunnelBlick, which runs as a menu bar application. The second is for ease of access to my home Macs and network-when on the VPN, my laptop appears as part of the local network, so screen and file sharing are simple and 100% reliable. The first is security when using unknown wifi connections. When I'm on my laptop, I connect to the VPN for two reasons. However, Apple's practice has been to make such mechanisms very difficult to use, and the warning in macOS Catalina does not indicate such a mechanism will be provided.I use a VPN on our home router, which runs pfSense. It may mean that Apple will provide a mechanism for users to allow loading of system extensions that use deprecated KPIs. It isn't clear what Apple means by the phrase "by default".

'tun' configurations may require the use of the other system extension but can easily be modified so no system extension is required. 'tap' configurations always require the use of one system extension. Tunnelblick includes, and for some configurations loads one of two such extensions: Has anyone already upgraded macOS to Big Sur (macOS 11.0) and using Tunnelblick to connect to VPNs? I have several configurations with tap or tun setup and it seems that I'm about to have a really bad times.Īpple has announced that "future OS releases will no longer load system extensions that use deprecated KPIs by default".
