Force DNS server ip while connected to VPN I'm using Fortclient VPN to connect to a customer network and the client enforces the use of their DNS (since the customer is in Turkey I get false DNS responses on wikipedia and other websites while connected)
Before high sierra I was able to reset the DNS server used using scutil:

&gt; d.init
&gt; d.add ServerAddresses * 8.8.8.8 8.8.4.4
&gt; set State:/Network/Service/forticlientsslvpn/DNS


that usually was enough, starting on high sierra even after setting the DNS value using set it still shows the old values:

&gt; d.show
&lt;dictionary&gt; {
  ServerAddresses : &lt;array&gt; {
    0 : 8.8.8.8
    1 : 8.8.4.4
  }
}
&gt; show State:/Network/Service/forticlientsslvpn/DNS
&lt;dictionary&gt; {
  ServerAddresses : &lt;array&gt; {
    0 : 192.168.20.10
    1 : 192.168.20.11
  }
}
&gt; set State:/Network/Service/forticlientsslvpn/DNS
&gt; show State:/Network/Service/forticlientsslvpn/DNS
&lt;dictionary&gt; {
  ServerAddresses : &lt;array&gt; {
    0 : 192.168.20.10
    1 : 192.168.20.11
  }
}


Is there another way to do it in High Sierra?
I've found a solution, open source client openfortivpn let you skip dns settings while connecting to the VPN. Using its --no-dns --pppd-no-peerdns options fixes it