I'm running macOS High Sierra (10.13.4) and trying to make traffic destined for subnet go through my VPN interface (utun1).

The command I tried to use is:

route change  -interface utun1

However, it gives me an error of route: bad address: I'm unable to understand why this is so.

The documentation of route says this:

route [-n] command [-net | -host] [-ifscope boundif] destination gateway [netmask]


where destination is the destination host or network, gateway is the next-hop intermediary via which packets should be routed. Routes to a particular host may be distinguished from those to a network by interpreting the Internet address specified as the destination argument. The optional modifiers -net and -host force the destination to be interpreted as a network or a host, respectively. Otherwise, if the destination has a ``local address part'' of INADDR_ANY (, or if the destination is the symbolic name of a network, then the route is assumed to be to a network; otherwise, it is presumed to be a route to a host. Optionally, the destination could also be specified in the net/bits format.

For example, 128.32 is interpreted as -host; 128.32.130 is interpreted as -host; -net 128.32 is interpreted as; -net 128.32.130 is interpreted as; and 192.168.64/20 is interpreted as -net 192.168.64 -netmask

Output of netstat -nr:

Routing tables

Destination        Gateway            Flags        Refs      Use   Netif Expire
0/1                 UGSc           73        0   utun1
default          UGSc            1        0     en0
10.8/24             UGSc           17        0   utun1            UH              1        0   utun1
10.160.16/23       link#5             UCS             0        0     en0     link#5             UCS             1        0     en0        b0:aa:77:a2:8e:bf  UHLWIir         5       86     en0    298    link#5             UCS             0        0     en0
127                UCS             0        0     lo0          UH              7  6945381     lo0        UGSc            0        0     en0
128.0/1             UGSc            5        0   utun1        UGSc            1        0     en0
169.254            link#5             UCS             0        0     en0
224.0.0/4          link#5             UmCS            1        0     en0        1:0:5e:0:0:fb      UHmLWI          0        0     en0    utun1              UHSb            0        0   utun1 link#5             UCS             0        0     en0

Note the route for which I successfully created using sudo route add -interface utun1.

Link to route documentation: https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man8/route.8.html

  • If you are trying to create a catch all route, then (a default route) is what you want. The bigger the number after the slash, the more specific (narrower) the route is. /32 means it matches only one destination address, in your case, which does not make sense in a route. – Johan Myréen Apr 17 '18 at 18:48

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.