[GH-ISSUE #17] awg-quick can't up interface with peers preconfigured #4

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

Originally created by @onyx-zup on GitHub (Sep 5, 2024).
Original GitHub issue: https://github.com/amnezia-vpn/amneziawg-tools/issues/17

aws instance, amnesiawg can fire up awg0 only with no peers in awg0.conf, otherwise "Unable to modify interface: Operation not supported" error

  • status: awg started and running with no peers
root@aws-client:/etc/amnezia/amneziawg# cat awg0.conf 
[Interface]
Address = 10.11.0.5/32
PrivateKey = |clent-privkey|
Jc = 10
Jmin = 100
Jmax = 1000
S1 = 50
S2 = 500
H1 = 111
H2 = 222
H3 = 333
H4 = 444
  • here am adding server peer with 'awg set awg0 peer |server-pubkey| endpoint ......' and running some iperf tests
root@aws-client:/etc/amnezia/amneziawg# awg set awg0 peer  |server-pubkey|  endpoint |server-ip|:42850 allowed-ips 10.11.0.0/24 persistent-keepalive 20

root@aws-client:/etc/amnezia/amneziawg# awg
interface: awg0
  public key: |client-pubkey|
  private key: (hidden)
  listening port: 36730
  jc: 10
  jmin: 100
  jmax: 1000
  s1: 50
  s2: 500
  h1: 111
  h2: 222
  h3: 333
  h4: 444

peer: |server-pubkey|
  endpoint: |server-ip|:42850
  allowed ips: 10.11.0.0/24
  latest handshake: 32 seconds ago
  transfer: 7.73 MiB received, 318.78 MiB sent
  persistent keepalive: every 20 seconds

  • here im saving current awg config
root@aws-client:/etc/amnezia/amneziawg# awg-quick save awg0
[#] awg showconf awg0
root@aws-client:/etc/amnezia/amneziawg# cat awg0.conf 
[Interface]
Address = 10.11.0.5/32
ListenPort = 36730
PrivateKey = |clent-privkey|
Jc = 10
Jmin = 100
Jmax = 1000
S1 = 50
S2 = 500
H1 = 111
H2 = 222
H3 = 333
H4 = 444

[Peer]
PublicKey = |server-pubkey|
AdvancedSecurity = on
AllowedIPs = 10.11.0.0/24
Endpoint = |server-ip|:42850
PersistentKeepalive = 20

  • here im shutting it down

root@aws-client:/etc/amnezia/amneziawg# awg-quick down awg0
[#] ip link delete dev awg0
  • and trying to start over again
root@aws-client:/etc/amnezia/amneziawg# awg-quick up awg0
[#] ip link add awg0 type amneziawg
[#] awg setconf awg0 /dev/fd/63
Unable to modify interface: Operation not supported
[#] ip link delete dev awg0

it will not start until i remove Peer section from awg0.conf

Originally created by @onyx-zup on GitHub (Sep 5, 2024). Original GitHub issue: https://github.com/amnezia-vpn/amneziawg-tools/issues/17 aws instance, amnesiawg can fire up awg0 only with no peers in awg0.conf, otherwise "Unable to modify interface: Operation not supported" error - status: awg started and running with no peers ``` root@aws-client:/etc/amnezia/amneziawg# cat awg0.conf [Interface] Address = 10.11.0.5/32 PrivateKey = |clent-privkey| Jc = 10 Jmin = 100 Jmax = 1000 S1 = 50 S2 = 500 H1 = 111 H2 = 222 H3 = 333 H4 = 444 ``` - here am adding server peer with 'awg set awg0 peer |server-pubkey| endpoint ......' and running some iperf tests ``` root@aws-client:/etc/amnezia/amneziawg# awg set awg0 peer |server-pubkey| endpoint |server-ip|:42850 allowed-ips 10.11.0.0/24 persistent-keepalive 20 root@aws-client:/etc/amnezia/amneziawg# awg interface: awg0 public key: |client-pubkey| private key: (hidden) listening port: 36730 jc: 10 jmin: 100 jmax: 1000 s1: 50 s2: 500 h1: 111 h2: 222 h3: 333 h4: 444 peer: |server-pubkey| endpoint: |server-ip|:42850 allowed ips: 10.11.0.0/24 latest handshake: 32 seconds ago transfer: 7.73 MiB received, 318.78 MiB sent persistent keepalive: every 20 seconds ``` - here im saving current awg config ``` root@aws-client:/etc/amnezia/amneziawg# awg-quick save awg0 [#] awg showconf awg0 root@aws-client:/etc/amnezia/amneziawg# cat awg0.conf [Interface] Address = 10.11.0.5/32 ListenPort = 36730 PrivateKey = |clent-privkey| Jc = 10 Jmin = 100 Jmax = 1000 S1 = 50 S2 = 500 H1 = 111 H2 = 222 H3 = 333 H4 = 444 [Peer] PublicKey = |server-pubkey| AdvancedSecurity = on AllowedIPs = 10.11.0.0/24 Endpoint = |server-ip|:42850 PersistentKeepalive = 20 ``` - here im shutting it down ``` root@aws-client:/etc/amnezia/amneziawg# awg-quick down awg0 [#] ip link delete dev awg0 ``` - and trying to start over again ``` root@aws-client:/etc/amnezia/amneziawg# awg-quick up awg0 [#] ip link add awg0 type amneziawg [#] awg setconf awg0 /dev/fd/63 Unable to modify interface: Operation not supported [#] ip link delete dev awg0 ``` # it will not start until i remove Peer section from awg0.conf
Author
Owner

@onyx-zup commented on GitHub (Sep 6, 2024):

Yes, i have kernel module installed and running

# lsmod |grep wg
amneziawg             102400  0
libchacha20poly1305    16384  2 amneziawg,wireguard
ip6_udp_tunnel         16384  2 amneziawg,wireguard
udp_tunnel             24576  2 amneziawg,wireguard
curve25519_x86_64      36864  2 amneziawg,wireguard
libcurve25519_generic    49152  3 amneziawg,curve25519_x86_64,wireguard
<!-- gh-comment-id:2333702053 --> @onyx-zup commented on GitHub (Sep 6, 2024): Yes, i have kernel module installed and running ``` # lsmod |grep wg amneziawg 102400 0 libchacha20poly1305 16384 2 amneziawg,wireguard ip6_udp_tunnel 16384 2 amneziawg,wireguard udp_tunnel 24576 2 amneziawg,wireguard curve25519_x86_64 36864 2 amneziawg,wireguard libcurve25519_generic 49152 3 amneziawg,curve25519_x86_64,wireguard ```
Author
Owner

@dragon1020 commented on GitHub (Sep 7, 2024):

You don't have to delete all "[Peer]" sections. "AdvancedSecurity = on" strings will be enough.
That's weird, but works for me. :-/

<!-- gh-comment-id:2335723093 --> @dragon1020 commented on GitHub (Sep 7, 2024): You don't have to delete all "[Peer]" sections. "AdvancedSecurity = on" strings will be enough. That's weird, but works for me. :-/
Author
Owner

@onyx-zup commented on GitHub (Sep 7, 2024):

Confirmed!
this setup works pretty stable for me

<!-- gh-comment-id:2336408735 --> @onyx-zup commented on GitHub (Sep 7, 2024): Confirmed! this setup works pretty stable for me
Author
Owner

@leninalive commented on GitHub (Sep 15, 2024):

Kernel module has been updated and this problem should have been fixed. Please check out and re-open this issue if needed.

<!-- gh-comment-id:2351706318 --> @leninalive commented on GitHub (Sep 15, 2024): Kernel module has been updated and this problem should have been fixed. Please check out and re-open this issue if needed.
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#4
No description provided.