qdm12 / gluetun

VPN client in a thin Docker container for multiple VPN providers, written in Go, and using OpenVPN or Wireguard, DNS over TLS, with a few proxy servers built-in.
https://hub.docker.com/r/qmcgaw/gluetun
MIT License
7.68k stars 359 forks source link

Bug: VPN_PORT_FORWARDING_LISTENING_PORT not working #2520

Open Rowdy opened 3 days ago

Rowdy commented 3 days ago

Is this urgent?

None

Host OS

Ubuntu

CPU arch

x86_64

VPN service provider

ProtonVPN

What are you using to run the container

docker-compose

What is the version of Gluetun

Running version latest built on 2024-10-12T14:29:01.263Z (commit 2388e05)

What's the problem 🤔

It's not crashing anymore but also not working... the forwarded port is just a random one, not the one defined in the docker compose yml: - VPN_PORT_FORWARDING_LISTENING_PORT=53411

As you suggested I should reference the old issue. Thanks in advance.

Share your logs (at least 10 lines)

2024-10-12T23:09:53+02:00 INFO [routing] default route found: interface eth0, gateway 172.18.0.1, assigned IP 172.18.0.21 and family v4
2024-10-12T23:09:53+02:00 INFO [routing] adding route for 0.0.0.0/0
2024-10-12T23:09:53+02:00 INFO [firewall] setting allowed subnets...
2024-10-12T23:09:53+02:00 INFO [routing] default route found: interface eth0, gateway 172.18.0.1, assigned IP 172.18.0.21 and family v4
2024-10-12T23:09:53+02:00 INFO [dns] using plaintext DNS at address 1.1.1.1
2024-10-12T23:09:53+02:00 INFO [http server] http server listening on [::]:8000
2024-10-12T23:09:53+02:00 INFO [healthcheck] listening on 127.0.0.1:9999
2024-10-12T23:09:53+02:00 INFO [firewall] allowing VPN connection...
2024-10-12T23:09:53+02:00 INFO [wireguard] Using userspace implementation since Kernel support does not exist
2024-10-12T23:09:53+02:00 INFO [wireguard] Connecting to 188.3.132.139:51820
2024-10-12T23:09:53+02: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.
2024-10-12T23:09:53+02:00 INFO [dns] downloading hostnames and IP block lists
2024-10-12T23:09:58+02:00 INFO [healthcheck] healthy!
2024-10-12T23:10:09+02:00 INFO [dns] DNS server listening on [::]:53
2024-10-12T23:10:09+02:00 INFO [dns] ready
2024-10-12T23:10:10+02:00 INFO [ip getter] Public IP address is 188.3.132.143 (Netherlands, Utrecht, Veenendaal)
2024-10-12T23:10:10+02:00 INFO [vpn] You are running on the bleeding edge of latest!
2024-10-12T23:10:10+02:00 INFO [port forwarding] starting
2024-10-12T23:10:10+02:00 INFO [port forwarding] gateway external IPv4 address is 188.3.132.143
2024-10-12T23:10:10+02:00 INFO [port forwarding] port forwarded is 38685
2024-10-12T23:10:10+02:00 INFO [firewall] setting allowed input port 38685 through interface tun0...
2024-10-12T23:10:10+02:00 WARN [firewall] IPv6 port redirection disabled because your kernel does not support IPv6 NAT: command failed: "ip6tables-legacy -t nat --append PREROUTING -i tun0 -p tcp --dport 38685 -j REDIRECT --to-ports 53411": ip6tables v1.8.10 (legacy): can't initialize ip6tables table `nat': Table does not exist (do you need to insmod?)
Perhaps ip6tables or your kernel needs to be upgraded.: exit status 3
2024-10-12T23:10:10+02:00 INFO [port forwarding] writing port file /tmp/gluetun/forwarded_port

Share your configuration

version: "2.1"
services:
  gluetun:
    image: qmcgaw/gluetun:latest
    container_name: gluetun
    cap_add:
      - NET_ADMIN
    security_opt:
      - no-new-privileges:true
    devices:
      - /dev/net/tun:/dev/net/tun
    volumes:
      - ./gluetun/:/gluetun
    environment:
      #https://github.com/qdm12/gluetun-wiki/blob/main/setup/providers/protonvpn.md
      - UPDATER_PERIOD=24h
      - VPN_SERVICE_PROVIDER=protonvpn
      - VPN_TYPE=wireguard
      - SERVER_COUNTRIES=Netherlands
      - WIREGUARD_PRIVATE_KEY=xyz
      - VPN_PORT_FORWARDING=on
      - TZ=Europe/Berlin
      - VPN_PORT_FORWARDING_LISTENING_PORT=53411
github-actions[bot] commented 3 days ago

@qdm12 is more or less the only maintainer of this project and works on it in his free time. Please: