Skip to content

add support for AzireVPN#3223

Open
jkaberg wants to merge 1 commit into
passteque:masterfrom
jkaberg:azirevpn
Open

add support for AzireVPN#3223
jkaberg wants to merge 1 commit into
passteque:masterfrom
jkaberg:azirevpn

Conversation

@jkaberg

@jkaberg jkaberg commented Mar 11, 2026

Copy link
Copy Markdown

Description

added support for AzireVPN, including support for port forwarding. Support for OpenVPN was not added, more information here

documentation/wiki PR also submitted at qdm12/gluetun-wiki#186

Accompanying PR against gluetun-servers also at qdm12/gluetun-servers#4

Issue

#497

Assertions

  • I am aware that we do not accept manual changes to the servers.json file
  • I am aware that any changes to settings should be reflected in the wiki

@qdm12 qdm12 force-pushed the master branch 2 times, most recently from 2c06921 to 9a5995f Compare March 16, 2026 13:48
@qdm12 qdm12 force-pushed the master branch 4 times, most recently from 40f126b to 44d5104 Compare May 3, 2026 04:29
@jkaberg

jkaberg commented May 13, 2026

Copy link
Copy Markdown
Author

@qdm12 would be great to get some feedback on this one!

@dwolstenholme13

Copy link
Copy Markdown

Hi @jkaberg I've tried out this PR on my setup, and while it seems to set up a VPN correctly, the port forwarding doesn't seem to be working for me:

gluetun  | 2026-05-31T16:30:08+09:00 INFO [wireguard] Wireguard setup is complete. Note Wireguard is a silent protocol and it may or may not work, without giving any error message. Typically i/o timeout errors indicate the Wireguard connection is not working.
gluetun  | 2026-05-31T16:30:08+09:00 INFO [MTU discovery] finding maximum MTU, this can take up to 6 seconds
gluetun  | 2026-05-31T16:30:12+09:00 INFO [MTU discovery] setting VPN interface tun0 MTU to maximum valid MTU 1435
gluetun  | 2026-05-31T16:30:13+09:00 INFO [dns] DNS server listening on [::]:53
gluetun  | 2026-05-31T16:30:14+09:00 INFO [dns] ready and using DNS server with dot upstream resolvers
gluetun  | 2026-05-31T16:30:14+09:00 INFO [dns] downloading hostnames and IP block lists
gluetun  | 2026-05-31T16:30:49+09:00 WARN [dns] downloading block lists failed, skipping: scanning: context deadline exceeded (Client.Timeout or context cancellation while reading body), scanning: context deadline exceeded (Client.Timeout or context cancellation while reading body)
gluetun  | 2026-05-31T16:30:54+09:00 INFO [ip getter] Public IP address is <public IP address> (<country/city I selected with SERVER_COUNTRIES> - source: ipinfo+ifconfig.co+ip2location+cloudflare)
gluetun  | 2026-05-31T16:31:00+09:00 INFO [vpn] There is a new release v3.41.1 (v3.41.1) created 108 days ago
gluetun  | 2026-05-31T16:31:00+09:00 INFO [port forwarding] starting
gluetun  | 2026-05-31T16:31:01+09:00 ERROR [vpn] starting port forwarding service: port forwarding for the first time: listing port forwardings: HTTP status code not OK: 500 500 Internal Server Error: {
gluetun  |     "status": "error",
gluetun  |     "message": "Internal error",
gluetun  |     "data": {
gluetun  |         "source_ip": "<public IP, same as in "Pubilc IP address" message above>",
gluetun  |         "internal_ipv4": "<my assigned IP, same as that in .conf files from AzireVPN>"
gluetun  |     }
gluetun  | }

To confirm I'm setting this up correctly, I went to the "VPN" tab in my AzireVPN account, and clicked on "Configuration File" to generate a new configuration file, which was the name of an animal. Inside this was a lot of .conf files, all with the same PrivateKey and Address lines. I copied the PrivateKey value to the WIREGUARD_PRIVATE_KEY env variable, and the IPv4 part ("x.y.z.a/32") to WIREGUARD_ADDRESSES in my docker-compose.yml file. VPN_SERVICE_PROVIDER is set to "azirevpn", and VPN_TYPE to "wireguard". I set SERVER_COUNTRIES to the name of the country I want my traffic to go through, VPN_PORT_FORWARDING to "on", and then I set AZIREVPN_TOKEN to the value which appeared in AzireVPN's Settings->Tokens page after I downloaded that config file.

Am I doing something wrong? Thanks!

@jkaberg

jkaberg commented May 31, 2026

Copy link
Copy Markdown
Author

Not entirely sure why it wouldnt work, here's an snippet of my docker compose environment:

....
      - VPN_SERVICE_PROVIDER=azirevpn
      - VPN_TYPE=wireguard
      - SERVER_COUNTRIES=Sweden
      - WIREGUARD_PRIVATE_KEY=<private key>
      - WIREGUARD_ADDRESSES=<redacted - but cidr like 10.0.123.123/32>
      - AZIREVPN_TOKEN=<redacted>
      - VPN_PORT_FORWARDING=on
....

Ran a test with above just now and Gluetun logs:

vpn-1  | 2026-05-31T22:18:53+02:00 INFO [dns] downloading hostnames and IP block lists
vpn-1  | 2026-05-31T22:18:53+02:00 INFO [ip getter] Public IP address is 123.123.123.123 (Sweden, Västra Götaland, Göteborg - source: ipinfo+ifconfig.co+ip2location+cloudflare)
vpn-1  | 2026-05-31T22:18:53+02:00 INFO [vpn] There is a new release v3.41.1 (v3.41.1) created 109 days ago
vpn-1  | 2026-05-31T22:18:53+02:00 INFO [port forwarding] starting
vpn-1  | 2026-05-31T22:18:54+02:00 INFO [port forwarding] fetching existing port forwards, got []
vpn-1  | 2026-05-31T22:18:54+02:00 INFO [port forwarding] port forwarded is 12345
vpn-1  | 2026-05-31T22:18:54+02:00 INFO [firewall] setting allowed input port 12345 through interface tun0...
vpn-1  | 2026-05-31T22:18:54+02:00 INFO [port forwarding] writing port file /tmp/gluetun/forwarded_port

@dwolstenholme13

dwolstenholme13 commented Jun 7, 2026

Copy link
Copy Markdown

Not entirely sure why it wouldnt work, here's an snippet of my docker compose environment:

Yeah, here's mine:

   environment:
      - TZ=<my TZ>
      - VPN_SERVICE_PROVIDER=azirevpn
      - VPN_TYPE=wireguard
      - WIREGUARD_ADDRESSES=10.0.<x.y>/32
      - WIREGUARD_PRIVATE_KEY="<my private key>"
      - SERVER_COUNTRIES=Sweden
      - VPN_PORT_FORWARDING=on
      - AZIREVPN_TOKEN="<my token>"

Then I get this in the start-up log:

gluetun  | 2026-06-07T18:37:41+09:00 INFO Settings summary:
gluetun  | ├── VPN settings:
gluetun  | |   ├── VPN provider settings:
gluetun  | |   |   ├── Name: azirevpn
gluetun  | |   |   ├── AzireVPN token: 4c8...d07
gluetun  | |   |   ├── Server selection settings:
gluetun  | |   |   |   ├── VPN type: wireguard
gluetun  | |   |   |   ├── Countries: sweden
gluetun  | |   |   |   └── Wireguard selection settings:
gluetun  | |   |   └── Automatic port forwarding settings:
gluetun  | |   |       ├── Redirection listening port: disabled
gluetun  | |   |       ├── Use port forwarding code for current provider
gluetun  | |   |       └── Forwarded port file path: /tmp/gluetun/forwarded_port
...
gluetun  | 2026-06-07T18:38:43+09:00 INFO [port forwarding] starting
gluetun  | 2026-06-07T18:38:44+09:00 ERROR [vpn] starting port forwarding service: port forwarding for the first time: listing port forwardings: HTTP status code not OK: 500 500 Internal Server Error: {
gluetun  |     "status": "error",
gluetun  |     "message": "Internal error",
gluetun  |     "data": {
gluetun  |         "source_ip": "<public IP address>",
gluetun  |         "internal_ipv4": "<WIREGUARD_ADDRESSES address>"
gluetun  |     }
gluetun  | }

But I've also found something odd: if I change the setting for "VPN_PORT_FORWARDING" to "off" and restart, I get this:

gluetun  | 2026-06-07T18:48:47+09:00 INFO [port forwarding] starting
gluetun  | 2026-06-07T18:48:57+09:00 ERROR [vpn] starting port forwarding service: port forwarding for the first time: listing port forwardings: doing request: Get "https://api.azirevpn.com/v3/portforwardings?internal_ipv4=<WIREGUARD_ADDRESSES address>": context deadline exceeded

@jkaberg

jkaberg commented Jun 24, 2026

Copy link
Copy Markdown
Author

@dwolstenholme13 sorry for the late reply, but yeah. I know Azire has been having some issues with their API servers and this is usually the result. Ping them on matrix (https://matrix.to/#/#azirevpn:xmr.se) and they'll resolve it for you

@garret

garret commented Jun 24, 2026

Copy link
Copy Markdown

@jkaberg but then do you think your PR should in general work? I don't have Azire yet but I have been considering to switch from when gluetun supports it. It seems also your PR is not merged into gluetun. Is it because it is waiting for more beta testers?

Thank you for your work!

Add support for the AzireVPN provider with Wireguard and port
forwarding via the AzireVPN API. OpenVPN is not supported since
AzireVPN discontinued it as of March 15, 2026.
@jkaberg

jkaberg commented Jun 24, 2026

Copy link
Copy Markdown
Author

@garret yeah, I've been running the code since the PR was created without hiccup.

I'm waiting for @qdm12 to provide some feedback or merge the PR - and just now I'm updating the branch against the current master

@jkaberg

jkaberg commented Jun 24, 2026

Copy link
Copy Markdown
Author

rebased and ready to go, added gluetun-servers PR aswell @qdm12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants