Hello, I was wondering if anyone could help me out with a docker stack I am running in portainer. Everything seems to work except getting trackers. Trackers are unreachable. My guess is an issue with PEERDNS. I've tried setting it to auto, 8.8.8.8, and the DNS value in my wireguard [interface] config with no luck.
Code
version: "2.1"
services:
wireguard:
image: lscr.io/linuxserver/wireguard
container_name: qbittorrent_wireguard
cap_add:
- NET_ADMIN
- SYS_MODULE
ports:
- 6881:6881 # qBittorrent TCP
- 6881:6881/udp # qBittorrent UDP
- 8080:8080 # qBittorrent WebUI
environment:
- PUID=1002 # non-root host uid
- PGID=100
- TZ=MYTIMEZONE
- PEERDNS=auto
volumes:
- /PublicData/DockerConfig/wireguard_client:/config
- /lib/modules:/lib/modules
sysctls:
- net.ipv4.conf.all.src_valid_mark=1 # not sure what this does
- net.ipv6.conf.all.disable_ipv6=0 # not sure what this does
restart: unless-stopped
qbittorrent:
image: lscr.io/linuxserver/qbittorrent
container_name: qbittorrent
environment:
- PUID=1002 # non-root host uid
- PGID=100
- TZ=MYTIMEZONE
- WEBUI_PORT=8080
volumes:
- MYPATHTOCONFIG:/config
- MYPATHTODOWNLOADS:/downloads
network_mode: service:wireguard
restart: unless-stopped
Alles anzeigen
I also added the following lines to the wireguard config, this was needed to be able to hit the qbittorrent web ui on port 8080 on the ip of my omv server, which is on my local network/router.
Code
PostUp = DROUTE=$(ip route | grep default | awk '{print $3}'); HOMENET=192.168.0.0/16; HOMENET2=10.0.0.0/8; HOMENET3=172.16.0.0/12; ip route add $HOMENET3 via $DROUTE;ip route add $HOMENET2 via $DROUTE; ip route add $HOMENET via $DROUTE;iptables -I OUTPUT -d $HOMENET -j ACCEPT;iptables -A OUTPUT -d $HOMENET2 -j ACCEPT; iptables -A OUTPUT -d $HOMENET3 -j ACCEPT; iptables -A OUTPUT ! -o %i -m mark ! --mark $(wg show %i fwmark) -m addrtype ! --dst-type LOCAL -j REJECT
PreDown = HOMENET=192.168.0.0/16; HOMENET2=10.0.0.0/8; HOMENET3=172.16.0.0/12; ip route del $HOMENET3 via $DROUTE;ip route del $HOMENET2 via $DROUTE; ip route del $HOMENET via $DROUTE; iptables -D OUTPUT ! -o %i -m mark ! --mark $(wg show %i fwmark) -m addrtype ! --dst-type LOCAL -j REJECT; iptables -D OUTPUT -d $HOMENET -j ACCEPT; iptables -D OUTPUT -d $HOMENET2 -j ACCEPT; iptables -D OUTPUT -d $HOMENET3 -j ACCEPT
Thanks in advance!