Home>

I want to add or change MacOS Mojave routing dynamically using commands, but there is no option to set metric.
Please tell me about alternative options, equivalent methods, or other methods to communicate over VPN under the same address system.

I have a Windows 10 machine with SoftEther installed at home.
It is used to connect to a home machine with a remote desktop via a VPN from an internet cafe, etc.
If the home and destination address systems are the same, the VPN itself can connect successfully, but remote desktop is not possible.
If the destination PC is Windows 10, you can use it by executing the following command,
I want to do the same on MacOS.
Or can you tell me how to make a remote desktop connection successful?

This worked on Windows 10.

route add<Home LAN>MASK<Home Netmask><Home PC and Softether server double>metric 25


I don't know the equivalent command on Mac. It was useless below.

route add<home LAN>/<netmask><home PC and Softether server>

2019/10/17 update
I tried the following, but it was not good.

  • Specify the netmask of the route add command directly to the server with 32.
  • Set the priority of VPN higher than WiFi in the network settings of macOS. (advice from uzyexe)
  • Answer # 1

    If you want to increase the priority of SoftEther's virtual interface,

    Open "System Preferences"->"Network" on Mac,
    Press the gear icon in the lower left and select "Set Service Order…"
    I think that this can be achieved by setting SoftEther's virtual interface to be higher than other interfaces.

    Reference: https://uwazumi.honeniq.net/2014/02/11/osx-network-order.html

  • Answer # 2

    The priority itself could not be changed, but I found a solution It was.
    It can be used by assigning a different IP address (example: 172.16.X.X) to a Windows 10 machine with SoftEther installed at home and connecting to that IP address by the following method.

    "Network connection"->Right click on the corresponding adapter->Properties->"Internet Protocol Version 4"->"Properties"->"Advanced"->"IP Address"-"Add"