Skip to content

Commit 6a224fd

Browse files
authored
feat(setup/advanced): document PUT /v1/portforward (#126)
1 parent f89609d commit 6a224fd

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

setup/advanced/control-server.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ The HTTP control server allows to modify the state of OpenVPN or Wireguard.
9797
## Port forwarding
9898

9999
- HTTP GET to `/v1/portforward` to obtain the port forwarded such as `{"port":5914}`
100+
- HTTP PUT to `/v1/portforwarded` with a body `{"ports": [5914]}` which overrides the exising port forwardings with the provided list of ports, thus also allowing clearing said portforwardings with `{"ports": []}`
100101

101102
## DNS
102103

setup/advanced/vpn-port-forwarding.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ Thanks to [@Marsu31](https://github.com/Marsu31)
5151

5252
## Allow a forwarded port through the firewall
5353

54-
For non-native integrations where you have a designated forwarded port from your VPN provider, you can allow it by adding it to the environment variable `FIREWALL_VPN_INPUT_PORTS`.
54+
For non-native integrations where you have a designated forwarded port from your VPN provider, you can allow it by adding it to the environment variable `FIREWALL_VPN_INPUT_PORTS`. This allows you to statically set your port forwardings whenever Gluetun starts.
55+
56+
In some cases static port forwardings may not suffice, which is why Gluetun's control server provides an approrpiate endpoint to be able to set or unset your forwarded ports during runtime, giving you the ability to implement your own custom solution. See [the control server port forwarding section](control-server.md#port-forwarding).
5557

5658
## Port redirection using iptables
5759

0 commit comments

Comments
 (0)