Send visits to chosen websites, everything from a torrent machine, and the torrent traffic of any device through a WireGuard VPN, with a kill switch: when no VPN tunnel answers, that traffic stops instead of leaving through your normal internet line, so your home address is never shown to those sites or to torrent peers. Everything else keeps using the normal line.

This guide follows the setup of a home network: two NordVPN tunnels (Seattle, then Portland), the websites yts.vg and yts1.mx, a download machine running Transmission (192.168.2.16), and torrent clients on other computers that use the peer port 51413.

At a glance:

Step Where What
1 Firewall › Aliases & objects The websites as one object (by name)
2 Network › Policy routing › Gateway groups A VPN group with the kill switch
3 Network › Policy routing › Policy routes Three routes: the websites, the torrent machine, the torrent port
4 Review and commit Commit, keep, and check

The VPN tunnels and their outbound NAT must exist first: see Send your TVs through a VPN, with a fail-safe (Steps 2 and 3).

Can Korthveil recognise torrent traffic by itself?

Not reliably, and no firewall does by addresses alone. Korthveil recognises applications (App-ID) from the names a connection uses: the website name in an HTTPS connection, the HTTP host, and DNS answers. That is how website routing works below. Torrent peers are other people's computers, reached by address and a random port, with no name to recognise: deep packet inspection of the torrent protocol is not part of Korthveil yet.

So torrent traffic is routed by what it reliably has:

Step 1: The websites as one object

Firewall › Aliases & objects › Add address object: name VPN_Sites, and under Entries type the website names, several at once separated by spaces: yts.vg www.yts.vg yts1.mx www.yts1.mx, then Add. Each name is checked at once and shown with the addresses it resolves to now; Korthveil follows them when the site's DNS changes. Add the www. name too: it is a separate name. Save to pending changes.

The VPN_Sites object: four website names and their current addresses
The VPN_Sites object: four website names and their current addresses

Shared addresses: many sites sit behind a content network (here Cloudflare: 104.21.x, 172.67.x). Routing a site's address also routes the other sites that happen to share it at that moment. That is harmless for a VPN route: those visits go through the VPN too.

Step 2: A VPN group with the kill switch

Network › Policy routing › Gateway groups › Add gateway group:

TORRENT_VPN: two NordVPN tunnels and the kill switch
TORRENT_VPN: two NordVPN tunnels and the kill switch

From 1.1.29 you can also choose Fastest instead of the fixed order: the healthy tunnel with the lowest ping carries the traffic.

Step 3: Three policy routes

Policy routes › Add policy route, each with Send via: A gateway group, Gateway group: TORRENT_VPN, from zone LAN:

  1. The websites (LAN: VPN_Sites via TORRENT_VPN): source any, destination VPN_Sites, service any. Every device's visits to those sites go through the VPN.
The website route
The website route
  1. The torrent machine (Transmission host: everything via TORRENT_VPN): source the machine's object (here Transmission_Host, 192.168.2.16, with a DHCP reservation), destination RFC1918 with Not these ticked (everything except your own networks), service any. The machine reaches the internet only through the VPN; your LAN, printers and shares stay direct.

  2. The torrent port on any device (LAN: torrent port 51413 via TORRENT_VPN): source any, destination RFC1918 with Not these, and two services: TCP with source port 51413 and UDP with source port 51413 (leave the destination ports empty). A torrent client on any computer, set to that port, uses the VPN for its UDP peers (uTP) and DHT, while the computer's other traffic stays on the normal line. Its outgoing TCP peer connections are not caught by this route: see below.

The torrent port route: TCP and UDP from port 51413
The torrent port route: TCP and UDP from port 51413

Order: policy routes are checked top to bottom and the first match decides. Move the three routes above broader routes that could match the same traffic first (for example imported routes for "Google & YouTube" or "LAN subnets"). In the example they are #2–#4, under the TV route.

The routes in order
The routes in order

What the port route does not catch (tested on the home network, 2 November 2026): torrent clients send UDP (uTP and DHT) from their peer port, so route 3 carries almost all the data through the VPN (1.66 GB of 1.66 GB in the test). But their outgoing TCP connections to peers use random source ports, so route 3 cannot recognise them: in the test, 52 TCP peer connections left through the normal line with the home address. Close that gap with one of:

A computer you work on: routing everything from it through a kill-switched VPN takes it offline when the VPN is down. For a computer you also use for work, use the port route (route 3) together with the reject rule, or a second address only for the torrent client.

Step 4: Commit, keep, and check

Review and commit: the network changes list a policy table per route, each through the tunnel (table 2002 dev wg0, …). Commit with the safety rollback on, then Keep these settings. With Clear old connections the change affects ticked (from 1.1.29), downloads and pages already open move to the VPN at once.

The group shows the active tunnel and the kill switch on:

TORRENT_VPN in use: wg0 active, wg1 ready, kill switch on
TORRENT_VPN in use: wg0 active, wg1 ready, kill switch on

Check it:

Good to know

The pictures are from the home rack firewall korthmain, 2 November 2026. Addresses of the internet line are not shown.