When using the docker image with more than one network setup (for example one network for the reverse proxy, one network to allow containers pertaining to qbittorrent to talk to each other), the current set of iptables rules will only allow one network interface (therefore one network) to be accessible.
Fortunately, docker is nice enough to explicitly define routes for each of the network interfaces it manages as proto kernel.
It should be possible to allow all network interfaces of the docker container to continue working with a code similar to this:
echo "Allow docker network"
docker_cirds=$(ip -o -4 route show proto kernel | awk '{print $1}')
for cidr in $docker_cirds; do
iptables -A INPUT -s "${cidr}" -d "${cidr}" -j ACCEPT
iptables -A OUTPUT -s "${cidr}" -d "${cidr}" -j ACCEPT
done
When using the docker image with more than one network setup (for example one network for the reverse proxy, one network to allow containers pertaining to qbittorrent to talk to each other), the current set of iptables rules will only allow one network interface (therefore one network) to be accessible.
Fortunately, docker is nice enough to explicitly define routes for each of the network interfaces it manages as
proto kernel
.It should be possible to allow all network interfaces of the docker container to continue working with a code similar to this:
This takes inspiration from https://github.com/hotio/qbittorrent/blob/release/root/etc/cont-init.d/02-setup-wg#L103 but applies it to all routes defined by the kernel