Skip to content

Setup TorGuard for port forwarding

Note

These settings are a recommendation if you want to choose other settings be my guest.

If you want to support me, please use the following referral link and use one of the following codes:

  • TGLIFE: Get 50% Off for Life for Anonymous Proxy, Anonymous VPN, Anonymous Webmail.
  • TGLIFE-STREAMING: Get 50% Off for Life Anonymous Proxy, Anonymous VPN, Streaming Bundle.
  • TGLIFE-PRO: Get 50% Off for Life for Anonymous VPN, Streaming Bundle, Anonymous VPN Pro.

torguard-FreeTrial-270x90


Login to your Client area

Login to your Client Area.

Example

Client Area Login

Create a user account

First we're going to create a User Account for your VPN so we won't need to use your main account that you use to login to your account on the Torguard site. This account will be used for authentication with your VPN Torrent client.

Services > My Services > Manage > Manage Credentials

Example

Client Area Manage Credentials

Create a new username and choose a secure password or create a random username and password.

Example

Create User Account


How to get the IP of your VPN server

Now it's time to get the IP of your VPN server you're going to use from the Global VPN Network, From your Client Area.

Servers > Global VPN Network

Example

Servers > Global VPN Network

Global VPN Network

Then we're going to select which server we're going to use,

For the best speed it's recommended to choose the one nearest to your location. Let's use for this example: USA Miami and copy/paste the Hostname us-fl.secureconnect.me.

Torguard Global VPN Network

Get your VPN IP

Open a cmd window or something equal and type:

    ping us-fl.secureconnect.me

You will then get the IP of the server. Remember that for later use.

Example

ping


How to setup Port forwarding

Note

This section will consist of 2 parts depending if you want to use OVPN or WireGuard so make sure you choose your preferred VPN Tunnel type.

Request Port Forward

From your Client Area go to your My Services.

Then click on Manage and select Request Port Forward.

Services > My Services > Manage > Request Port Forward

Example

Request Port Forward

VPN Tunnel Type

Choose your preferred VPN Tunnel type.

OVPN Request Port Forward

OVPN Request Port Forward

Request New Port Forward OVPN

  1. That's the IP we found earlier.
  2. Select UDP.
  3. Select a Port/Auth I personally use 995|SHA1.
  4. Select the Protocol TCP.
  5. I suggest to use a high Port number 10.000+ or a game port you don't use, don't use the default torrent ports 6881- 6889 (This is also the port you will use in your torrent client).
  6. Click on the + sign and do the same with the UDP Protocol.
  7. Then click on Submit Request.

If everything went according to plan you will see something like this.

status

You will also receive a e-mail with the ports you forwarded.

Note

Normally it doesn't take more then a few seconds/minutes to get the ports approved if it takes longer or you get PENDING I suggest to ping the server again (or choose another sever) and you often get a new IP and retry it again with the new IP.

WireGuard Request Port Forward

WireGuard Request Port Forward

Request New Port Forward WireGuard

  1. That's the IP we found earlier.
  2. Select UDP. (‼ KEEP THIS ON UDP FOR WireGuard ‼)
  3. Select a Port/Auth and select WireGuard.
  4. Select the Protocol TCP.
  5. I suggest to use a high Port number 10.000+ or a game port you don't use, don't use the default torrent ports 6881- 6889 (This is also the port you will use in your torrent client).
  6. Click on the + sign and do the same with the UDP Protocol.
  7. Then click on Submit Request.

WARNING

‼ DON'T CHANGE OPTION 2 UDP to TCP ‼

If everything went according to plan you will see something like this.

status

You will also receive a e-mail with the ports you forwarded.

Note

Normally it doesn't take more then a few seconds/minutes to get the ports approved if it takes longer or you get PENDING I suggest to ping the server again (or choose another sever) and you often get a new IP and retry it again with the new IP.


How to create the config file

Note

This section will consist of 2 parts depending if you want to use OVPN or WireGuard so make sure you choose your preferred VPN Tunnel type.

From your Client Area go to your Config Generator.

Tools > Config Generator

Example Select Tools > Config Generator

Tools - Config Generator

Config Generator

Choose your preferred VPN Tunnel type.

OVPN Config Generator

OVPN Config Generator

OVPN Config Generator

  1. Keep this on Default.
  2. Choose OpenVPN.
  3. Put in the IP we got earlier and used for the port forwarding.
  4. Choose UDP.
  5. Choose 995|SHA1 or what you selected during the port forwarding.
  6. Choose AES-128-GCM.
  7. Choose 2.4 and above.
  8. Check Require TLS 1.2
  9. Click on Generate Config,

Now you will download a .conf file with a random number.

Rename the extension from *.conf to *.ovpn and copy it to your openvpn folder of your VPN torrent client.

WireGuard Config Generator

WireGuard Config Generator

WireGuard Config Generator

  1. Choose WireGuard.
  2. Put in the IP we got earlier and used for the port forwarding.
  3. Add your VPN Username.
  4. Add your `VPN Password.
  5. Click on Generate Config

Now you will download a .conf file with a random number.

Rename the file from *.conf to wg0.conf and copy it to your wireguard folder of your VPN torrent client.

Before we can make use of it you will need to edit the wg0.conf file first and add the following at line 7.

PreUp = bash /config/wireguard/torguard.sh

Your wg0.conf should look something like this:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# TorGuard WireGuard Config
[Interface]
PrivateKey = secretprivatekey
ListenPort = 51820
DNS = 1.1.1.1
Address = xx.xx.xxx.xx/24
PreUp = bash /config/wireguard/torguard.sh

[Peer]
PublicKey = publickey
AllowedIPs = 0.0.0.0/0
Endpoint = xx.xxx.xx.xxx:1443
PersistentKeepalive = 25

Then you will need to create a bash script in your /config/wireguard of your torrent client appdata folder named torguard.sh (This script will get executed just before starting WireGuard) with the following info it depending which images you're using.

Hotio's VPN Containers
Hotio's VPN Containers
#!/usr/bin/bash

pubkey=$(grep PrivateKey "${CONFIG_DIR}/wireguard/wg0.conf" | awk '{print $3}' | wg pubkey)
wgserver=$(grep Endpoint "${CONFIG_DIR}/wireguard/wg0.conf" | awk '{print $3}')

curl -ksG -u "${TORGUARD_USER}":"${TORGUARD_PASS}" \
   --data-urlencode "public-key=${pubkey}" "https://${wgserver}/api/v1/setup"

You will also have to add the additional environment variables TORGUARD_USER and TORGUARD_PASS or fill them in into the script directly (see curl command). These credentials are the ones we created HERE.

Binhex VPN Containers
Binhex VPN Containers
#!/usr/bin/bash

pubkey=$(grep PrivateKey "config/wireguard/wg0.conf" | awk '{print $3}' | wg pubkey)
wgserver=$(grep Endpoint "config/wireguard/wg0.conf" | awk '{print $3}')

curl -ksG -u "${VPN_USER}":"${VPN_PASS}" \
   --data-urlencode "public-key=${pubkey}" "https://${wgserver}/api/v1/setup"

You will also have to add the additional environment variables VPN_USER and `VPN_PASS or fill them in into the script directly (see curl command). These credentials are the ones we created HERE.


THNX:

A big thnx to mrhotio for his excellent instructions on how to setup WireGuard for TorGuard.


Last update: August 2, 2021 17:42:58