Jump to content
Not connected, Your IP: 18.221.112.220
cubesmi

gluetun port forwarding issue

Recommended Posts

Posted ... (edited)

Hi!

I'm struggling with gluetun port forwarding to another container.

In order to debug my setup I came up with following docker compose which sets up a simple nginx webserver and VPN port forwarding.

  • 'wget localhost:80' from inside the gluetun container works
  • 'wget <host-ip>:29099' from LAN works as well, if I expose 29099:80 in the gluetun container
Can anyone spot the flaw in following setup? Thanks in advance 🙂
version: "3"
services:
  gluetun-v1:
    image: qmcgaw/gluetun:v3.33
    container_name: gluetun-v1
    cap_add:
      - NET_ADMIN
    environment:
      - VPN_SERVICE_PROVIDER=airvpn
      - VPN_TYPE=wireguard
      - WIREGUARD_PRIVATE_KEY=xxx
      - WIREGUARD_PRESHARED_KEY=xxx
      - WIREGUARD_ADDRESSES=10.147.182.65/32
      - SERVER_REGIONS=Europe
      - FIREWALL_VPN_INPUT_PORTS=29099
  nginx:
    image: nginx
    container_name: nginx-v1
    network_mode: service:gluetun-v1
1552715483_Screenshot2023-06-04at18_46_19.png.b7fcf009190b19184b32f023542b98bf.png


Cheers, cubesmi

  Edited ... by cubesmi

Share this post


Link to post

Split from:

Please describe your own issue, what you've tried and where you're stuck. Your setup is different and might have a different core issue than the one you refer to. :)


NOT AN AIRVPN TEAM MEMBER. USE TICKETS FOR PROFESSIONAL SUPPORT.

LZ1's New User Guide to AirVPN « Plenty of stuff for advanced users, too!

Want to contact me directly? All relevant methods are on my About me page.

Share this post


Link to post
Posted ... (edited)

I just set up airvpn with gluetun today. I was using Mullvad previously and have always had the ports defined in the container. You probably need to add this to the gluetun container's compose:
 

    ports:
      - 29099:80
      - 29099:80/udp
Edited ... by plaidy

Share this post


Link to post

You change the port on the VPN server side from 29099 to 80, which is then forwarded to your server with docker running on.
I would assume the correct environment variable setting would be FIREWALL_VPN_INPUT_PORTS=80 as the traffic arrives at port 80 at your machine.
 

Share this post


Link to post

This exposes the web server port through the gluetun container on the host machine, unfortunately this doesn't solve the issue; the web server is still not accessible via the public airvpn ip address 😞

Screenshot 2023-06-05 at 19.31.48.png

Share this post


Link to post
11 hours ago, 48oift]h[ow94]8q2w3l said:

Did anyone solve this yet? I have the exact same setup issue with Nginx and Gluetun. Works fine locally but can't get it to work remotely


Hello!

Yes, various users found the problem in their configuration, you may check whether their solutions are applicable for your case too:
https://airvpn.org/forums/topic/56370-portforwarding-not-working-gluetun-and-desktop-app/?tab=comments#comment-223375
https://airvpn.org/forums/topic/56288-proper-way-to-set-up-airvpn-wireguard-with-portforwarding-in-a-docker-with-gluetun-on-nas/?tab=comments#comment-222853

Also consider to contact Gluetun community as Gluetun supports AirVPN.

Kind regards
 

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Security Check
    Play CAPTCHA Audio
    Refresh Image

×
×
  • Create New...