I currenly reside in a country with strict piracy rules but also have access to the internet in a country where piracy is not enforced. I want to setup a VPN and route qBittorrent’s traffic through it. The idea is to do something like this:

I am fresh to selfhosting and most of the time have no clue how to achieve what I want. So far I have tried Tailscale but I think it won’t work how I want it to. If it helps, I have domain name registered. Can anybody point me to the right direction?

Update (if anyone is seeking answers):

I went with tailscale which I have already set up before on the rpi3. Somehow, no matter what I try, wireguard or pivpn would not work. Maybe I have hands growing out of my ass or something, no idea.

What did work is Dante. I setup socks5 on pi through tailscale0 and it worked wonders. Qbittorent did connect and detected IP of rpi3. The best part is that opposed to wireguard, dedicated port does not have to be open in order for Dante to work. I see it as a win win! Now I’m hyped to go back to my homeland and install pi there.

  • abominable_panda@lemmy.world
    link
    fedilink
    English
    arrow-up
    7
    ·
    edit-2
    3 months ago

    Raspberry Pi:

    1. Install wireguard (as a server)
    2. Set up a peer/client config
    3. Open wireguard port on the router

    MiniPC:

    1. Install wireguard (as a client)
    2. Add server config and connect to server
    3. Verify connection
    4. Ensure connect on boot

    Points to note:

    • Configure them both locally and ensure you have a connection before you move the pi to another country

    • If you’re behind a CGNAT on one network, that’ll change some things. That network will have to be the client. (If both are behind CGNAT, you’re out of luck and cant use this - will have to be tailscale or other method)

    • If using a domain name make sure its always pointing to your ip (in case it’s not static)

    • I think if you set allowed ip as 0.0.0.0/0 on the client it’ll route all traffic.

    Edit:

    Saw your comment about just having qbt use the vpn. Check this guide out

  • Atherel@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    4
    ·
    3 months ago

    Wireguard on the pi was already mentioned.

    If you use docker containers, you could use Gluetun to route its traffic through the VPN. Without containers, on Linux you can use firejail to restrict qBittrorrent to the vpn interface. On windows… no idea, sry.

  • plantsmakemehappy@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    3 months ago

    A second option for docker is the hotio image for qbit. Has VPN support built in so you can just throw it your wg0 conf to use.

  • MajesticTechie@feddit.uk
    link
    fedilink
    English
    arrow-up
    1
    ·
    3 months ago

    run installer curl -L https://install.pivpn.io/ | bash

    • configure wireguard
    • setup non root user
    • Set a port

    Create a user with pivpn add

    Example:

    root@funhaus:~# pivpn add
    Enter a Name for the Client: user.name
    

    The conf file can also be found in /home/user.name/configs

    Copy the conf to your machine. Install WireGuard and use that conf.

    In qbitorrent you should make sure the application is set to use the VPN network, otherwise it’ll use both. Go to Settings > Advanced > Set Wireguard from “Network Interface”