Development discussion of WireGuard
 help / color / mirror / Atom feed
* Wrong route on macOS
@ 2021-07-08  4:52 zhengmian hu
  2021-07-08  5:07 ` zhengmian hu
  0 siblings, 1 reply; 2+ messages in thread
From: zhengmian hu @ 2021-07-08  4:52 UTC (permalink / raw)
  To: wireguard

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Wrong route on macOS
  2021-07-08  4:52 Wrong route on macOS zhengmian hu
@ 2021-07-08  5:07 ` zhengmian hu
  0 siblings, 0 replies; 2+ messages in thread
From: zhengmian hu @ 2021-07-08  5:07 UTC (permalink / raw)
  To: wireguard

The macOS version is 11.4 (20F71).
I also found that when the client config contains two peers, one of
them just doesn't work.

zhengmian hu <huzhengmian@gmail.com> 于2021年7月8日周四 上午12:52写道:
>
> 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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-07-08  5:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-08  4:52 Wrong route on macOS zhengmian hu
2021-07-08  5:07 ` zhengmian hu

Development discussion of WireGuard

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/wireguard/0 wireguard/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 wireguard wireguard/ http://inbox.vuxu.org/wireguard \
		wireguard@lists.zx2c4.com
	public-inbox-index wireguard

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.wireguard


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git