VPN Redirection based on specific domain and IP

I have a VPN connection on my mac and I try to redirect (1) only some IP range and (2) domain throw VPN connection.

  1. I achieved to redirect all IP range from 192.168.11.0/24 through VPN by creating a file /etc/ppp/ip-up and write it :

    #!/bin/sh
    /sbin/route add -net 192.168.11.0/24 -interface ppp0
    
  2. For the redirection of all hostname from a domain (ie. *.domain) to the VPN, I tried to define the DNS Name Server address in the parameters of the VPN connection but it doesn’t work (cf. picture).

Is there another way to (a) redirect all *.domain to the VPN or (b) use firstly the remote DNS server ?

Many thanks

enter image description here

Answer

Attribution
Source : Link , Question Author : Alexis G , Answer Author : Community

Leave a Comment