[GH-ISSUE #1037] client app does not support IPv6 to install server #342

Open
opened 2026-10-13 20:19:21 +00:00 by bsakaguchi · 5 comments
Owner

Originally created by @ramdroid2015 on GitHub (Sep 2, 2024).
Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/1037

Client app does not support IPv6 to install server.
The "Server IP address" field only gets IP v4.

Originally created by @ramdroid2015 on GitHub (Sep 2, 2024). Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/1037 Client app does not support IPv6 to install server. The "Server IP address" field only gets IP v4.
Author
Owner

@cowsay commented on GitHub (Oct 18, 2024):

The problem of not supporting IPv6 (except that IPv6 resources are not reachable), the connection does not drop immediately, instead, it must wait for an application timeout:

c:\>curl -6 https://one.one.one.one
curl: (28) Failed to connect to one.one.one.one port 443 after 42070 ms: Could not connect to server

c:\>curl https://[2606:4700:4700::1111]
curl: (28) Failed to connect to 2606:4700:4700::1111 port 443 after 21035 ms: Could not connect to server

The same behavior in browsers.

Maybe is there any way to edit config file so we can add IPv6 manually? I couldn't find it anywhere in app or Windows AppData. For example, I have config from some commercial VPN that provides config for amnezia-wg it looks like that:

[Interface]
Address = i.p.v.4, i:p:v:6
PrivateKey = 
DNS = 
Jc = 5
Jmin = 51
Jmax = 843
S1 = 0
S2 = 0
H1 = 1
H2 = 2
H3 = 3
H4 = 4


[Peer]
PublicKey =
AllowedIPs = 0.0.0.0/0, ::/0
Endpoint =

Looks like usual wg except special vars, and it contains IPv6 internal address and AllowedIPs has IPv6 range. And it works.

<!-- gh-comment-id:2422158091 --> @cowsay commented on GitHub (Oct 18, 2024): The problem of not supporting IPv6 (except that IPv6 resources are not reachable), the connection does not drop immediately, instead, it must wait for an application timeout: ``` c:\>curl -6 https://one.one.one.one curl: (28) Failed to connect to one.one.one.one port 443 after 42070 ms: Could not connect to server c:\>curl https://[2606:4700:4700::1111] curl: (28) Failed to connect to 2606:4700:4700::1111 port 443 after 21035 ms: Could not connect to server ``` The same behavior in browsers. Maybe is there any way to edit config file so we can add IPv6 manually? I couldn't find it anywhere in app or Windows AppData. For example, I have config from some commercial VPN that provides config for amnezia-wg it looks like that: ``` [Interface] Address = i.p.v.4, i:p:v:6 PrivateKey = DNS = Jc = 5 Jmin = 51 Jmax = 843 S1 = 0 S2 = 0 H1 = 1 H2 = 2 H3 = 3 H4 = 4 [Peer] PublicKey = AllowedIPs = 0.0.0.0/0, ::/0 Endpoint = ``` Looks like usual wg except special vars, and it contains IPv6 internal address and AllowedIPs has IPv6 range. And it works.
Author
Owner

@marek22k commented on GitHub (Oct 18, 2024):

As a workaround for the unreachable problem, you could create an unreachable route for ::/0 - this would tell the operating system that IPv6 is not available. It would therefore try IPv4 straight away.

[Interface]
...
PostUp = ip -6 route add unreachable ::/0

However, if you don't use the workaround, I could think of another program: If one accesses a blocked resource like Discord and IPv6 is used and a block page is displayed, IPv4 is never tried and thus never use Amnezia. Discord would still be blocked. I don't know how realistic the problem is though.

<!-- gh-comment-id:2422243144 --> @marek22k commented on GitHub (Oct 18, 2024): As a workaround for the unreachable problem, you could create an unreachable route for `::/0` - this would tell the operating system that IPv6 is not available. It would therefore try IPv4 straight away. ``` [Interface] ... PostUp = ip -6 route add unreachable ::/0 ``` However, if you don't use the workaround, I could think of another program: If one accesses a blocked resource like Discord and IPv6 is used and a block page is displayed, IPv4 is never tried and thus never use Amnezia. Discord would still be blocked. I don't know how realistic the problem is though.
Author
Owner

@cowsay commented on GitHub (Oct 19, 2024):

But how can I change the client config of the server that is installed by the AmneziaVPN app?

<!-- gh-comment-id:2423787009 --> @cowsay commented on GitHub (Oct 19, 2024): But how can I change the client config of the server that is installed by the AmneziaVPN app?
Author
Owner

@MRZA-MRZA commented on GitHub (Oct 26, 2024):

I managed to get full ipv6 support with AmneziaWG but not with amnezia-client.
To get ipv6 working install amneziawg on both server and client as described here https://github.com/amnezia-vpn/amneziawg-linux-kernel-module then configure it like normal Wireguard
Example config:
Server:

[Interface]
PrivateKey = <server privkey>
Address = 10.8.2.0/24,fd80:3826:0e08::/48/64
ListenPort = 49714
Jc = 44
Jmin = 595
Jmax = 1036
S1 = 88
S2 = 25
H1 = 294355973
H2 = 901271656
H3 = 1760747826
H4 = 1082601656

PostUp = iptables -A FORWARD -i ens3 -o awg0 -j ACCEPT --wait 10; iptables -A FORWARD -i awg0 -j ACCEPT; ip6tables -A FORWARD -i awg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o ens3 -j MASQUERADE --wait 10
PostDown = iptables -D FORWARD -i ens3 -o awg0 -j ACCEPT --wait 10; iptables -D FORWARD -i awg0 -j ACCEPT --wait 10; ip6tables -D FORWARD -i awg0 -j ACCEPT --wait 10; iptables -t nat -D POSTROUTING -o ens3 -j MASQUERADE --wait 10

[Peer]
PublicKey = <clinet pubkey>
PresharedKey = <psk>
AllowedIPs = 10.8.2.2/32,aaaa:bbbb:cccc:1::/64

Client:

[Interface]
PrivateKey = <client privkey>
Address = 10.8.2.2/32,aaaa:bbbb:cccc:1::1/64
Jc = 44
Jmin = 595
Jmax = 1036
S1 = 88
S2 = 25
H1 = 294355973
H2 = 901271656
H3 = 1760747826
H4 = 1082601656

[Peer]
PublicKey = <server pubkey>
PresharedKey = <psk>
AllowedIPs = 0.0.0.0/0, ::/0
Endpoint = [<ipv6 endpoint>]:49714
PersistentKeepalive = 60

In this case server has /48 prefix
Also you need to proxy ndp f. e. with ndppd
Edit: made some amends to configuration (it now uses ULA)

<!-- gh-comment-id:2439636877 --> @MRZA-MRZA commented on GitHub (Oct 26, 2024): I managed to get full ipv6 support with AmneziaWG but not with amnezia-client. To get ipv6 working install amneziawg on both server and client as described here https://github.com/amnezia-vpn/amneziawg-linux-kernel-module then configure it like normal Wireguard Example config: Server: ``` [Interface] PrivateKey = <server privkey> Address = 10.8.2.0/24,fd80:3826:0e08::/48/64 ListenPort = 49714 Jc = 44 Jmin = 595 Jmax = 1036 S1 = 88 S2 = 25 H1 = 294355973 H2 = 901271656 H3 = 1760747826 H4 = 1082601656 PostUp = iptables -A FORWARD -i ens3 -o awg0 -j ACCEPT --wait 10; iptables -A FORWARD -i awg0 -j ACCEPT; ip6tables -A FORWARD -i awg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o ens3 -j MASQUERADE --wait 10 PostDown = iptables -D FORWARD -i ens3 -o awg0 -j ACCEPT --wait 10; iptables -D FORWARD -i awg0 -j ACCEPT --wait 10; ip6tables -D FORWARD -i awg0 -j ACCEPT --wait 10; iptables -t nat -D POSTROUTING -o ens3 -j MASQUERADE --wait 10 [Peer] PublicKey = <clinet pubkey> PresharedKey = <psk> AllowedIPs = 10.8.2.2/32,aaaa:bbbb:cccc:1::/64 ``` Client: ``` [Interface] PrivateKey = <client privkey> Address = 10.8.2.2/32,aaaa:bbbb:cccc:1::1/64 Jc = 44 Jmin = 595 Jmax = 1036 S1 = 88 S2 = 25 H1 = 294355973 H2 = 901271656 H3 = 1760747826 H4 = 1082601656 [Peer] PublicKey = <server pubkey> PresharedKey = <psk> AllowedIPs = 0.0.0.0/0, ::/0 Endpoint = [<ipv6 endpoint>]:49714 PersistentKeepalive = 60 ``` In this case server has /48 prefix Also you need to proxy ndp f. e. with ndppd Edit: made some amends to configuration (it now uses ULA)
Author
Owner

@MRZA-MRZA commented on GitHub (Oct 30, 2024):

This configuration works with AmneziaWG android client but not with AmneziaVPN linux client (if imported from file). It works with amneziawg-go though.

<!-- gh-comment-id:2448302227 --> @MRZA-MRZA commented on GitHub (Oct 30, 2024): This configuration works with AmneziaWG android client but not with AmneziaVPN linux client (if imported from file). It works with amneziawg-go though.
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#342
No description provided.