29
submitted 10 months ago* (last edited 10 months ago) by [email protected] to c/[email protected]

I want to run only qBittorrent through my VPN but with my current setup, I have a namespace for OpenVPN and qBittorrent runs entirely through it. The issue with that is that Sonarr and Radarr can't access it. Because of that, I would like to switch my setup to use a network interface instead. What would be the best way to do that?

Edit: I used this guide, with some changes to make it work on my setup, to set it up. I can also post my docker-compose file here if anyone's interested.

you are viewing a single comment's thread
view the rest of the comments
[-] [email protected] 1 points 10 months ago

I know of a similar setup. Arr stack with qBittorrent and VPN on kubernetes. A bit different than yours in that the arr+qBit+VPN run in the same namespace. Here's how:

***
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: qbittorrent-ingress
  namespace: arr
spec:
  ingressClassName: nginx
  rules:
  - host: your.ho.st
    http:
     paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: qbittorrent
            port:
              number: 8080
***
kind: Service
apiVersion: v1
metadata:
  name: qbittorrent
  namespace: arr
spec:
  selector:
    app: qbittorrent
  ports:
  - protocol: TCP
    port: 8080
    targetPort: 8080
***
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: qbittorrent
  namespace: arr
spec:
  storageClassName: zfs
  accessModes:
    - ReadWriteMany
  resources:
    requests:
      storage: 1Ti
***
apiVersion: apps/v1
kind: Deployment
metadata:
  namespace: arr
  name: qbittorrent
spec:
  replicas: 1
  selector:
    matchLabels:
      app: qbittorrent
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: qbittorrent
    spec:
      containers:
        - name: qbittorrent
          image: linuxserver/qbittorrent
          imagePullPolicy: Always
          volumeMounts:
            - mountPath: "/config"
              name: "volume"
            - mountPath: "/media"
              name: "media"
          env:
            - name: PUID
              value: "1000"
            - name: PGID
              value: "1000"
            - name: TZ
              value: "Etc/UTC"
          ports:
            - containerPort: 8080
        - name: gluetun
          image: qmcgaw/gluetun
          imagePullPolicy: Always
          securityContext:
            capabilities:
              add: ["NET_ADMIN"]
          volumeMounts:
            - mountPath: /dev/net/tun
              name: tun
          env:
            - name: VPN_SERVICE_PROVIDER
              value: "mullvad"
            - name: VPN_TYPE
              value: "wireguard"
            - name: WIREGUARD_PRIVATE_KEY
              value: "removed"
            - name: WIREGUARD_ADDRESSES
              value: "removed"
            - name: SERVER_CITIES
              value: "removed"
            - name: FIREWALL_INPUT_PORTS
              value: "8080"
            - name: TZ
              value: "Etc/UTC"
      restartPolicy: Always
      volumes:
        - name: volume
          persistentVolumeClaim:
            claimName: qbittorrent
        - name: media
          nfs:
            server: nfs.server.local
            path: /media
        - name: tun
          hostPath:
            path: /dev/net/tun

The relevant bit of the qBittorrent.conf:

[BitTorrent]
Session\Interface=tun0
Session\InterfaceName=tun0

Best of luck!

[-] [email protected] 2 points 10 months ago

Managed to set it up before you posted this already but thanks anyway. I also used Gluetun btw.

this post was submitted on 21 Nov 2023
29 points (96.8% liked)

Piracy: ꜱᴀɪʟ ᴛʜᴇ ʜɪɢʜ ꜱᴇᴀꜱ

53958 readers
673 users here now

⚓ Dedicated to the discussion of digital piracy, including ethical problems and legal advancements.

Rules • Full Version

1. Posts must be related to the discussion of digital piracy

2. Don't request invites, trade, sell, or self-promote

3. Don't request or link to specific pirated titles, including DMs

4. Don't submit low-quality posts, be entitled, or harass others



Loot, Pillage, & Plunder


💰 Please help cover server costs.

Ko-FiLiberapay


founded 1 year ago
MODERATORS