Just another qBittorrent image. But compiled from the source.
Environments
DISABLE_VPN
set it to disable VPN
Needed docker arguments
--cap-add=NET_ADMIN
--sysctl="net.ipv4.conf.all.src_valid_mark=1"
--sysctl="net.ipv6.conf.all.disable_ipv6=1"
Suggested setup using PostUp/PreDown hooks
-
Set your
LAN_CIDR
with docker environments eg:10.0.0.0/24
or192.168.0.0/24
-
BR_GATEWAY
,BR_DEV
,BR_CIDR
are exported from .profile and should be available on interative shell, otherwise needs to loadsource /root/.profile
-
Add or replace PostUp and PreDown on your
/config/wg0.conf
# LAN_CIDR comes from docker env PostUp = ip route add $LAN_CIDR via $BR_GATEWAY dev $BR_DEV PostUp = iptables -I OUTPUT ! -d $LAN_CIDR ! -o %i -m mark ! --mark $(wg show %i fwmark) -m addrtype ! --dst-type LOCAL -j REJECT PostUp = iptables -I OUTPUT -s $BR_CIDR -d $BR_CIDR -j ACCEPT PreDown = ip route del $LAN_CIDR PreDown = iptables -F OUTPUT