diff --git a/Dockerfile b/Dockerfile index 6de4c3bb..aed17a2c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -41,7 +41,7 @@ ENV VPNSP=pia \ TZ= \ UID=1000 \ GID=1000 \ - IP_STATUS_FILE="/ip" \ + IP_STATUS_FILE="/tmp/gluetun/ip" \ # PIA, Windscribe, Surfshark, Cyberghost, Vyprvpn, NordVPN, PureVPN only USER= \ PASSWORD= \ @@ -49,7 +49,7 @@ ENV VPNSP=pia \ # PIA only PIA_ENCRYPTION=strong \ PORT_FORWARDING=off \ - PORT_FORWARDING_STATUS_FILE="/forwarded_port" \ + PORT_FORWARDING_STATUS_FILE="/tmp/gluetun/forwarded_port" \ # Mullvad and PureVPN only COUNTRY= \ CITY= \ diff --git a/README.md b/README.md index 65ad26d3..c3f99ca5 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,7 @@ Want more testing? ▶ [see the Wiki](https://github.com/qdm12/gluetun/wiki/Test | Variable | Default | Choices | Description | | --- | --- | --- | --- | | 🏁 `VPNSP` | `private internet access` | `private internet access`, `mullvad`, `windscribe`, `surfshark`, `vyprvpn`, `nordvpn`, `purevpn` | VPN Service Provider | -| `IP_STATUS_FILE` | `/ip` | Any filepath | Filepath to store the public IP address assigned | +| `IP_STATUS_FILE` | `/tmp/gluetun/ip` | Any filepath | Filepath to store the public IP address assigned | | `PROTOCOL` | `udp` | `udp` or `tcp` | Network protocol to use | | `OPENVPN_VERBOSITY` | `1` | `0` to `6` | Openvpn verbosity level | | `OPENVPN_ROOT` | `no` | `yes` or `no` | Run OpenVPN as root | @@ -110,7 +110,7 @@ Want more testing? ▶ [see the Wiki](https://github.com/qdm12/gluetun/wiki/Test | `REGION` | | One of the [PIA regions](https://www.privateinternetaccess.com/pages/network/) | VPN server region | | `PIA_ENCRYPTION` | `strong` | `normal`, `strong` | Encryption preset | | `PORT_FORWARDING` | `off` | `on`, `off` | Enable port forwarding on the VPN server | - | `PORT_FORWARDING_STATUS_FILE` | `/forwarded_port` | Any filepath | Filepath to store the forwarded port number | + | `PORT_FORWARDING_STATUS_FILE` | `/tmp/gluetun/forwarded_port` | Any filepath | Filepath to store the forwarded port number | - Mullvad diff --git a/internal/params/pia.go b/internal/params/pia.go index 1f6d7e98..55c251ad 100644 --- a/internal/params/pia.go +++ b/internal/params/pia.go @@ -27,7 +27,7 @@ func (r *reader) GetPortForwarding() (activated bool, err error) { // GetPortForwardingStatusFilepath obtains the port forwarding status file path // from the environment variable PORT_FORWARDING_STATUS_FILE func (r *reader) GetPortForwardingStatusFilepath() (filepath models.Filepath, err error) { - filepathStr, err := r.envParams.GetPath("PORT_FORWARDING_STATUS_FILE", libparams.Default("/forwarded_port"), libparams.CaseSensitiveValue()) + filepathStr, err := r.envParams.GetPath("PORT_FORWARDING_STATUS_FILE", libparams.Default("/tmp/gluetun/forwarded_port"), libparams.CaseSensitiveValue()) return models.Filepath(filepathStr), err } diff --git a/internal/params/system.go b/internal/params/system.go index 40b2d0e8..d111536a 100644 --- a/internal/params/system.go +++ b/internal/params/system.go @@ -23,6 +23,6 @@ func (r *reader) GetTimezone() (timezone string, err error) { // GetIPStatusFilepath obtains the IP status file path // from the environment variable IP_STATUS_FILE func (r *reader) GetIPStatusFilepath() (filepath models.Filepath, err error) { - filepathStr, err := r.envParams.GetPath("IP_STATUS_FILE", libparams.Default("/ip"), libparams.CaseSensitiveValue()) + filepathStr, err := r.envParams.GetPath("IP_STATUS_FILE", libparams.Default("/tmp/gluetun/ip"), libparams.CaseSensitiveValue()) return models.Filepath(filepathStr), err }