[GH-ISSUE #55] h1 and h2 Broken #22

Closed
opened 2026-10-13 21:02:29 +00:00 by bsakaguchi · 2 comments
Owner

Originally created by @SWAGcreator-del on GitHub (Jun 21, 2026).
Original GitHub issue: https://github.com/amnezia-vpn/amneziawg-tools/issues/55

Title: H1 and H2 values are truncated after awg-quick up

Environment:

  • Arch Linux
  • Kernel: 7.0.12-arch1-1
  • amneziawg-tools: 1.0.20260618
  • amneziawg-dkms: 1.0.20260611

Config:

H1 = 424258794
H2 = 1552734037
H3 = 136716108
H4 = 329527368

Problem:

After running:

sudo awg-quick up wg0

the interface is created successfully, but VPN does not work.

Checking runtime values:

sudo awg show wg0 h1
returns:

1

and

sudo awg show wg0 h2
returns:

2

while H3 and H4 are loaded correctly.

As a result:

  • latest-handshakes = 0
  • RX = 0
  • TX increases

Workaround:

Running:

sudo awg set wg0 h1 424258794
sudo awg set wg0 h2 1552734037

immediately restores connectivity and handshake starts working.

This suggests that awg setconf (used by awg-quick) may incorrectly parse or apply H1/H2 values.

Originally created by @SWAGcreator-del on GitHub (Jun 21, 2026). Original GitHub issue: https://github.com/amnezia-vpn/amneziawg-tools/issues/55 Title: H1 and H2 values are truncated after awg-quick up Environment: * Arch Linux * Kernel: 7.0.12-arch1-1 * amneziawg-tools: 1.0.20260618 * amneziawg-dkms: 1.0.20260611 Config: H1 = 424258794 H2 = 1552734037 H3 = 136716108 H4 = 329527368 Problem: After running: sudo awg-quick up wg0 the interface is created successfully, but VPN does not work. Checking runtime values: sudo awg show wg0 h1 returns: 1 and sudo awg show wg0 h2 returns: 2 while H3 and H4 are loaded correctly. As a result: * latest-handshakes = 0 * RX = 0 * TX increases Workaround: Running: sudo awg set wg0 h1 424258794 sudo awg set wg0 h2 1552734037 immediately restores connectivity and handshake starts working. This suggests that awg setconf (used by awg-quick) may incorrectly parse or apply H1/H2 values.
Author
Owner

@SWAGcreator-del commented on GitHub (Jun 22, 2026):

I did some additional testing.

It looks like the actual values configured in wg0.conf do not matter for this issue.
For example, my configuration originally contained:
H1 = 424258794
H2 = 1552734037

I changed both values to completely different numbers, restarted the interface, and observed exactly the same behavior:

sudo awg show wg0 h1
1
sudo awg show wg0 h2
2
sudo awg show wg0 latest-handshakes

and returns 0, RX stays at 0, and only TX increases.
No matter what values are specified in the configuration file, after awg-quick up the runtime values become H1 = 1 and H2 = 2.
The only way to make the tunnel work is to manually apply the values afterwards:

sudo awg set wg0 h1 <correctValue>
sudo awg set wg0 h2 <correctValue>

After doing that, handshakes immediately start working.

This suggests that awg-quick or awg setconf is not simply reading the wrong values back from the kernel. Instead, H1 and H2 appear to be applied incorrectly during interface configuration and are always replaced with 1 and 2 regardless of the values present in the configuration file.

<!-- gh-comment-id:4763881405 --> @SWAGcreator-del commented on GitHub (Jun 22, 2026): ### I did some additional testing. It looks like the actual values configured in wg0.conf do not matter for this issue. For example, my configuration originally contained: **H1 = 424258794 H2 = 1552734037** I changed both values to completely different numbers, restarted the interface, and observed exactly the same behavior: ``` sudo awg show wg0 h1 1 sudo awg show wg0 h2 2 sudo awg show wg0 latest-handshakes ``` and returns 0, RX stays at 0, and only TX increases. No matter what values are specified in the configuration file, after awg-quick up the runtime values become H1 = 1 and H2 = 2. The only way to make the tunnel work is to manually apply the values afterwards: ``` sudo awg set wg0 h1 <correctValue> sudo awg set wg0 h2 <correctValue> ``` ### After doing that, handshakes immediately start working. This suggests that awg-quick or awg setconf is not simply reading the wrong values back from the kernel. Instead, H1 and H2 appear to be applied incorrectly during interface configuration and are always replaced with 1 and 2 regardless of the values present in the configuration file.
Author
Owner

@ygurov commented on GitHub (Jun 22, 2026):

Hi @SWAGcreator-del
Please check this issue https://github.com/amnezia-vpn/amneziawg-tools/issues/51
Has been fixed in v1.0.20260618-2

<!-- gh-comment-id:4765665086 --> @ygurov commented on GitHub (Jun 22, 2026): Hi @SWAGcreator-del Please check this issue https://github.com/amnezia-vpn/amneziawg-tools/issues/51 Has been fixed in v1.0.20260618-2
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/amneziawg-tools#22
No description provided.