Wrong route on macOS

zhengmian hu huzhengmian at gmail.com
Thu Jul 8 04:52:50 UTC 2021


I expect no data to be sent to the server when I only visit the local
address. However, this is not true for wireguard on macOS.

Detailed setup:
App:
Downloaded from app store. App version: 1.0.13 (24), Go backend
version: f9b48a96.

Server:
```
[Interface]
Address = 10.110.210.1/24
SaveConfig = true
ListenPort = 51820
PrivateKey = xxxxSERVER_PRIVATExxxx

[Peer]
PublicKey = xxxxCLIENT_PUBLICxxxx
AllowedIPs = 10.110.210.7/32
Endpoint = xxxx
```

Client:
```
[Interface]
PrivateKey = xxxxCLIENT_PRIVATExxxx
Address = 10.110.210.7/32

[Peer]
PublicKey = xxxxSERVER_PUBLICxxxx
AllowedIPs = 10.110.210.1/24
Endpoint = xxxSERVER_IPxxx:51820
PersistentKeepalive = 25
```

Test:
```
❯ traceroute 10.110.210.7
traceroute to 10.110.210.7 (10.110.210.7), 64 hops max, 52 byte packets
 1  10.110.210.1 (10.110.210.1)  22.118 ms  19.846 ms  19.929 ms
 2  10.110.210.7 (10.110.210.7)  40.627 ms  40.264 ms  43.752 ms
```

Route:
```
❯ netstat -rn -f inet
Routing tables

Internet:
Destination        Gateway            Flags        Netif Expire
default            192.168.0.1        UGScg          en0
default            link#17            UCSIg        utun2
10.110.210/24      link#17            UCS          utun2
10.110.210.7       10.110.210.7       UH           utun2
127                127.0.0.1          UCS            lo0
127.0.0.1          127.0.0.1          UH             lo0
...
255.255.255.255/32 link#17            UCSI         utun2
```

Expected behaviour:
When using `traceroute 10.110.210.7`, the server `10.110.210.1` doesn't show up.

Other:
I have tried the same configuration on Windows, and it works fine.


More information about the WireGuard mailing list