This guide covers how to correctly configure the Deluge torrent client to access the torrent network via AirVPN utilising pfSenses port forwarding capability. The guide makes the assumption you already have your Deluge client installed somewhere accessible. I run Deluge within a FreeNAS jail and I intend to put together a guide soon to help with installation for those who need it. This guide continues to build upon the foundations laid previously in my earlier pfSense configuration guides.
First thing we need to do is create a port forward within AirVPNs network.
Log into your account at airpn.org and navigate to Client Area > Forwarded ports. You’ll see a option to add a new port forward here which looks something like this.
You can pretty much leave this as it is and just click add. Air will assign you a free port automatically. With multiple connections DDNS doesn’t work so feel free to leave that blank too, for torrent use it won’t matter as our client will be configured to use our specific port number anyway.
After clicking Add you will see your new port forward summary, make a note of the local port as you will need this later on, in my case its 56777. As my connection makes use of three simultaneous connections to provide some load balancing and failover protection there are three servers represented here.
You’ll notice there are three grey circles next to the TCP test button. If you select the TCP test now they will remain grey as there isn’t a port forward in place on our local network to enable a response yet.
First let setup up some basic parameters in aliases which makes life easier if we need to amend anything later on.
Log into pfSense and navigate to Firewall > Aliases > IP
Create a new alias to specify the torrent server
Navigate to Firewall > Aliases > Ports
Create a new alias to specify the torrent client port
Now we’ll set up the port forward for our first VPN tunnel.
Navigate to Firewall > NAT > Port Forward
Configure rule as follows:
Verify your port forward rule summary looks like this
As part of creating this forward, an associated firewall rule was created in the VPN_WAN interface we specified.
Navigate to firewall > rule > VPN_WAN
Verify your firewall rules look like this
I’m going to focus on setting up the ports rather than the whole Deluge client here as your setup may require some subtle differences from mine depending on which tracker you use.
Load up your Deluge client and navigate to preferences > Network. Set the interface up as follows:-
Head back to AirVPN > Client Area > Forwarded ports.
To provide some load balancing and failover protection, lets make use of our three VPN tunnels and enable them all to handle torrent traffic.
Log back in to pfSense and navigate to Firewall > NAT > Port forwards
We know that existing port forward works correctly so lets duplicate it to the two other VPN interfaces.
make the following changes to the duplicate rule
Now make another duplicate for VPN_WAN3, click the duplicate icon next to the VPN_WAN rule again but this time make the following changes
Verify your port forward rules look like this when complete
We need to make a similar adjustment to the firewall rule ordering for those two new port forward rules which have been created.
Navigate to firewall > rule > VPN2_WAN
and again for VPN3_WAN, navigate to firewall > rule > VPN3_WAN
Head back to AirVPN > Client Area > Forwarded ports.
Load up Deluge again and initiate a download. Verify that the three gateways are handling traffic correctly and performance is in line with your ISP line speeds etc.
Here’s a image from my Deluge setup verifying I am seeing 17MiB/s, as fast as my ISP’s line will go on my current subscription plan.
Here’s the pfSense gateway traffic demonstrating the download spread over three VPN connections and the WAN being fully saturated.