Skip to content

VPN_PORT_FORWARDING_UP_COMMAND never runs in podman quadlet, although port forwarding is working. #3382

Description

@Greylinux

Is this urgent?

No

Host OS

Fedora CoreOS

CPU arch

x86_64

VPN service provider

ProtonVPN

What are you using to run the container

Podman

What is the version of Gluetun

V3.41.1 latest

What's the problem 🤔

Hi,
I am running using Podman Quadlets with a rootless user. Port forwarding is enabled and working correctly ( tested using the port checker here ), however the VPN_PORT_FORWARDING_UP_COMMAND is never run, I'm not sure what I'm doing wrong.

this is the test command I'm using
/bin/sh -c "echo My forwarded ports are {{PORTS}}, the first forwarded port is {{PORT}} and the VPN network interface is {{VPN_INTERFACE}}"

Share your logs (at least 10 lines)

2026-07-01T09:01:43+01:00 INFO [routing] default route found: interface eth0, gateway 10.88.0.1, assigned IP 10.88.0.5 and family v4
2026-07-01T09:01:43+01:00 INFO [routing] adding route for 0.0.0.0/0
2026-07-01T09:01:43+01:00 INFO [firewall] setting allowed subnets...
2026-07-01T09:01:43+01:00 INFO [routing] default route found: interface eth0, gateway 10.88.0.1, assigned IP 10.88.0.5 and family v4
2026-07-01T09:01:43+01:00 INFO [firewall] setting allowed input port 8080 through interface eth0...
2026-07-01T09:01:43+01:00 INFO [healthcheck] listening on 127.0.0.1:9999
2026-07-01T09:01:43+01:00 INFO [http server] http server listening on [::]:8000
2026-07-01T09:01:43+01:00 INFO [firewall] allowing VPN connection...
2026-07-01T09:01:43+01:00 INFO [wireguard] Using available kernelspace implementation
2026-07-01T09:01:43+01:00 INFO [wireguard] Connecting to 31.13.191.66:51820
2026-07-01T09:01:43+01:00 INFO [vpn] 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.
2026-07-01T09:01:43+01:00 INFO [MTU discovery] finding maximum MTU, this can take up to 6 seconds
2026-07-01T09:01:47+01:00 INFO [MTU discovery] setting VPN interface tun0 MTU to maximum valid MTU 1400
2026-07-01T09:01:47+01:00 INFO [dns] DNS server listening on [::]:53
2026-07-01T09:01:47+01:00 INFO [dns] ready and using DNS server with dot upstream resolvers
2026-07-01T09:01:47+01:00 INFO [dns] downloading hostnames and IP block lists
2026-07-01T09:01:48+01:00 INFO [ip getter] Public IP address is 31.13.191.71 (Sweden, Stockholm, Kista - source: ipinfo+ifconfig.co+ip2location+cloudflare)
2026-07-01T09:01:48+01:00 INFO [dns] leak check report: 104.23.222.41 (40%), 104.23.218.64 (30%), 162.158.180.55 (20%), 104.23.222.42 (10%)
2026-07-01T09:01:48+01:00 INFO [vpn] You are running on the bleeding edge of latest!
2026-07-01T09:01:48+01:00 INFO [port forwarding] starting
2026-07-01T09:01:49+01:00 INFO [port forwarding] port forwarded is 55271
2026-07-01T09:01:49+01:00 INFO [firewall] setting allowed input port 55271 through interface tun0...
2026-07-01T09:01:49+01:00 INFO [port forwarding] writing port file /tmp/gluetun/forwarded_port

Share your configuration

[Unit]
Description=Gluetun Container

[Container]
ContainerName=gluetun
Image=docker.io/qmcgaw/gluetun:latest
PublishPort=8080:8080
Environment=FIREWALL_INPUT_PORTS=8080
Environment=VPN_SERVICE_PROVIDER=protonvpn
Environment=VPN_TYPE=wireguard
Environment=WIREGUARD_PRIVATE_KEY=
Environment=SERVER_COUNTRIES=Sweden,Netherlands
Environment=VPN_PORT_FORWARDING=on
Environment=PORT_FORWARD_ONLY=on
Environment=VPN_PORT_FORWARDING_PROVIDER=protonvpn
Environment=VPN_PORT_FORWARDING_UP_COMMAND=/bin/sh -c "echo My forwarded ports are {{PORTS}}, the first forwarded port is {{PORT}} and the VPN network interface is {{VPN_INTERFACE}}"
Environment=TZ=Europe/London
AutoUpdate=registry
PodmanArgs=--privileged
AddCapability=NET_ADMIN
AddDevice=/dev/net/tun:/dev/net/tun

Volume=/var/home/core/ArrStack/gluetun/config:/gluetun:Z,U

[Service]
Restart=always

[Install]
WantedBy=default.target

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions