[GH-ISSUE #3402] [macOS] Imported WireGuard profile connects but has no internet with Address /24; changing to /32 fixes it #3249

Open
opened 2026-11-07 17:58:05 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @kir-sth on GitHub (Nov 4, 2026).
Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/3402

Environment

  • MacBook Air M4, macOS 27.0.1 (arm64)
  • AmneziaVPN 5.1.0.6 (ac175c8)
  • Self-hosted server, classic WireGuard imported from .conf, no obfuscation

Steps to reproduce

  1. Import a working WireGuard configuration into AmneziaVPN. Relevant settings:

    [Interface]
    Address = 10.8.0.21/24
    DNS = 1.1.1.1, 8.8.8.8
    MTU = 1280
    
    [Peer]
    AllowedIPs = 0.0.0.0/0, ::/0
    PersistentKeepalive = 25
    

    This is a configuration fragment; keys and endpoint are omitted.

  2. Connect. AmneziaVPN reports “Connected”, and the logs confirm a successful handshake, but internet access does not work.

  3. The same configuration works correctly in the official WireGuard macOS client, with traffic exiting through my VPN server.

Expected behavior

The imported profile should provide working internet access, as it does in the WireGuard client.

Verified workaround

Change only the interface address prefix, then re-import and reconnect:

- Address = 10.8.0.21/24
+ Address = 10.8.0.21/32

Internet access immediately works, and traffic exits through the VPN server. No other configuration changes were needed.

This appears consistent with host bits being cleared by QHostAddress::parseSubnet() in IPUtilsMacos::addIP4AddressToDevice().
I did not capture the actual interface address before the workaround, so this mechanism is not directly verified on my Mac.

  • #1089: Linux report with the same /32 workaround.
  • #1647 and #2048: configured host address becomes the network address.
  • PR #2840: proposed fix for this mechanism on Linux; currently open and does not modify the macOS implementation.

Could the macOS address parsing be checked for the same problem?

Logs

App and tunnel logs before and after the workaround are attached. Handshake succeeds in both cases.
VPN endpoint IP, peer public key, profile IDs and network service IDs have been anonymized consistently. All other log content is unchanged.

before_tunnel.log
before_app.log
after_tunnel.log
after_app.log

Originally created by @kir-sth on GitHub (Nov 4, 2026). Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/3402 ### Environment - MacBook Air M4, macOS 27.0.1 (arm64) - AmneziaVPN 5.1.0.6 ([`ac175c8`](https://github.com/amnezia-vpn/amnezia-client/releases/tag/5.1.0.6)) - Self-hosted server, classic WireGuard imported from `.conf`, no obfuscation ### Steps to reproduce 1. Import a working WireGuard configuration into AmneziaVPN. Relevant settings: ```ini [Interface] Address = 10.8.0.21/24 DNS = 1.1.1.1, 8.8.8.8 MTU = 1280 [Peer] AllowedIPs = 0.0.0.0/0, ::/0 PersistentKeepalive = 25 ``` This is a configuration fragment; keys and endpoint are omitted. 2. Connect. AmneziaVPN reports “Connected”, and the logs confirm a successful handshake, but internet access does not work. 3. The same configuration works correctly in the official WireGuard macOS client, with traffic exiting through my VPN server. ### Expected behavior The imported profile should provide working internet access, as it does in the WireGuard client. ### Verified workaround Change only the interface address prefix, then re-import and reconnect: ```diff - Address = 10.8.0.21/24 + Address = 10.8.0.21/32 ``` Internet access immediately works, and traffic exits through the VPN server. No other configuration changes were needed. ### Suspected cause and related reports This appears consistent with host bits being cleared by [`QHostAddress::parseSubnet()`](https://github.com/amnezia-vpn/amnezia-client/blob/5.1.0.6/client/platforms/macos/daemon/iputilsmacos.cpp#L96) in `IPUtilsMacos::addIP4AddressToDevice()`. I did not capture the actual interface address before the workaround, so this mechanism is not directly verified on my Mac. - [#1089](https://github.com/amnezia-vpn/amnezia-client/issues/1089): Linux report with the same `/32` workaround. - [#1647](https://github.com/amnezia-vpn/amnezia-client/issues/1647) and [#2048](https://github.com/amnezia-vpn/amnezia-client/issues/2048): configured host address becomes the network address. - [PR #2840](https://github.com/amnezia-vpn/amnezia-client/pull/2840): proposed fix for this mechanism on Linux; currently open and does not modify the macOS implementation. Could the macOS address parsing be checked for the same problem? ### Logs App and tunnel logs before and after the workaround are attached. Handshake succeeds in both cases. VPN endpoint IP, peer public key, profile IDs and network service IDs have been anonymized consistently. All other log content is unchanged. [before_tunnel.log](https://github.com/user-attachments/files/34399341/before_tunnel.log) [before_app.log](https://github.com/user-attachments/files/34399343/before_app.log) [after_tunnel.log](https://github.com/user-attachments/files/34399342/after_tunnel.log) [after_app.log](https://github.com/user-attachments/files/34399340/after_app.log)
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
amnezia-vpn/amnezia-client#3249
No description provided.