A tool for keeping ProtonVPN, OPNsense, and qBittorrent forwarded ports in sync.
Warning
I'm not responsible for any issues you may encounter.
This tool helps automate port forwarding from ProtonVPN to qBittorrent via OPNsense. The tool polls ProtonVPN for the forwarded port, checks the ports set in OPNsense and qBittorrent, and updates them if necessary.
You can ignore qBittorrent by using the QBIT_SKIP
environment variable.
I recommend using the provided Docker Compose file to simplify the set up of qbop. This container must be connected to ProtonVPN due to the required natpmpc
command.
The container image is available here: https://github.com/clajiness/qbop/pkgs/container/qbop
- Docker Engine - https://docs.docker.com/engine/install/
- OPNsense
- qBittorrent
- ProtonVPN subscription
LOOP_FREQ:
This value, in seconds, determines how often the script runs. The default is45
. This value is recommended by ProtonVPN.REQUIRED_ATTEMPTS
The number of loops with a new forwarded port before updating OPNsense and qBit. The default is 3, min is 1, and max is 10.PROTON_GATEWAY:
Default is10.2.0.1
. Do not use http(s):// or a trailing slash.OPN_INTERFACE_ADDR:
OPNsense Interface Address. Requires http(s):// and no trailing slash.OPN_API_KEY:
OPNsense API KeyOPN_API_SECRET:
OPNsense API SecretOPN_PROTON_ALIAS_NAME:
The firewall alias that you use for ProtonVPN's forwarded port. For example,proton_vpn_forwarded_port
.QBIT_SKIP:
[true
/false
] Skip qBittorrent. Iftrue
, subsequent qBit environment variables are not required.QBIT_ADDR:
The IP address of your qBittorrent app. Requires http(s):// and no trailing slash.QBIT_USER:
qBittorrent usernameQBIT_PASS:
qBittorrent password