

However, after running the above commands successfully without any errors, when I run scutil -dns, I still see the same old DNS servers. Set State:/Network/Service/forticlientsslvpn/DNS I then tried the below command in terminal (after running scutil as sudo) I’m hoping I can do this automatically through a shell script or a similar method.Įdit (): To summarise what I've already tried as per my comment: After turning on my VPN,I found out the primary service id by running scutil and then typing list on the next line. To summarise, my question is how can I change the DNS servers to 192.168.1.1 whenever VPN is connected. Reach : 0x00020002 (Reachable,Directly Reachable Address)Īnd a few other ip6 (options: mdns)resolvers When VPN is not connected, if I run scutil -dns in a terminal on my Mac, I get the below output resolver #1 When VPN is connected, if I run scutil -dns in a terminal on my Mac, I get the below output resolver #1Īnd a few other ip6 (options: mdns) resolvers Note, I found an old post that seemed to be answering the question but I couldn’t figure out exactly what to do on macOS Catalina. Obviously, even though I am interested in using a different DNS server, I don’t want the routing table to change so the traffic for correct destination/subnet is routed correctly over the VPN tunnel. I’ll be using IP addresses to access network resources over VPN.

I want to change the default DNS servers pushed by my SSLVPN (FortiClient on macOS).
