All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
[Tutorial] Use your local machine to seed torrents using your remote VPS
Purpose - many people have Carrier-grade NAT in their home network. Its not easy to seed their Linux ISOs when you have CGNAT. This tutorial aims to simplify it provided you already have a small VPS with some provider and the VPS can actually forward ports and has a public IP
Steps
Use wireguard-install to install wireguard in your VPS and create a config file so that you can use that config file to securely connect to your VPS from your phone/local machine
Carefully note down the port which is recommended by the installer.
Allow all traffic from the outside world to this port in your VPS. If you are using ufw, then the command is
sudo ufw allow <port_in_step2>Then see the list of interfaces available for your VPS using
ip aChances are that you see
eth0andwg0. You will probably have your public VPS ip with theeth0interface and your private wireguard ip with yourwg0interfaceNow either copy or
scpyour wireguard config which you just created in step 1 to your local machine.Install the official wireguard client for your machine. Im going to assume that you are using windows
Import the config file in the client and once you do that, note your private IP. Its there in the interface>addresses section. Lets say its this 10.66.66.2/32 . This is the private IP of your local machine once it connects to your VPS using the wireguard protocol.
[MOST IMPORTANT STEP] Switch to root user or use sudo and edit the
wg0.confunder/etc/wireguarddirectory in the VPS.
Paste this just below PrivateKey under [Interface] section
##### added them for torrent
PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PostUp = iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 59595 -j DNAT --to-destination 10.66.66.2:59595
PostUp = iptables -t nat -A PREROUTING -i eth0 -p udp --dport 59595 -j DNAT --to-destination 10.66.66.2:59595
PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
PostDown = iptables -t nat -D PREROUTING -i eth0 -p tcp --dport 59595 -j DNAT --to-destination 10.66.66.2:59595
PostDown = iptables -t nat -D PREROUTING -i eth0 -p udp --dport 59595 -j DNAT --to-destination 10.66.66.2:59595
###### added them for torrent
What does this do ?
Any request aimed at the public IP at port 59595 in the VPS should be routed to the same port 59595 to the private IP 10.66.66.2/32 which essentially means "to the local machine".
Allow all traffic from the outside world to this port in your VPS. If you are using ufw, then the command is
sudo ufw allow 59595As you might have guessed, the 59595 is the port which is to be used under Connection > Port used for incoming connections for qbittorrent in your local machine.
Its also very important to allow connections to this port in the windows firewall as well in your local machine. So create an inbound rule and allow port 59595 . Guide
Now use the client in your local machine to connect to your server using wireguard, open up qbittorrent > Settings > Advanced > Network Interface > select the one which is being used by the wireguard client.
Download any Linux ISO in qbittorrent, open up https://portchecker.co/ and change to port 59595 and you should see that its open and now can seed from your local machine.


Comments
If your provider cannot/refuses to disable CGNAT… it’s time for a new provider.
Good Tutorial... I would advice against setting this up if your VPS provider does not allow Torrenting or isn't DMCA Ignored.
I don't think it is that easy to pick a new provider, most countries don't have the option to choose another provider, we are stuck in an ugly world of IPv4 shortage.
sometimes there are no other providers.
Yes exactly lol. You summed it up !
Thanks for sharing
I wonder the performance loss by using wireguard and connecting to VPS to forward your trafic, like how much percent of your upload bandwidth can be utilized
Yeah, how hard can it be to press the disable CGNAT button.
Really you can do that? I remember reading it from Tailscale blog that it is near impossible: https://tailscale.com/blog/how-tailscale-works
rent a seedbox.
or install swizzin.
Or just use a VPN that allows torrenting and have better speeds.
true, but if you’re just seeding/downloading private torrents, a vps can be cheaper and faster 🤷♂️
I have 1Gbps at home and I get around 800-900Mbps on a 1c1g VPS. Upgrading next year so you can ask me then to give it another test.
Yep, private torrents and any storage VPS are the way to go. Even with a VPN, it should have port forwarding, which might cost extra, and not all of the providers offer that.