pfSense WireGuard VPN Client - Complete Setup Guide

Last updated: September 11, 2025
Table of Contents

🚀 About WireGuard on pfSense

WireGuard is the latest VPN protocol offering superior performance, security, and simplicity. This guide will help you configure WireGuard on your pfSense router to protect your entire network with TorGuard VPN.

Why WireGuard on pfSense?

✨ Benefits of Router-Level VPN

🏠

Whole Network

Protect all devices automatically

Best Performance

WireGuard is 3-4x faster

🔐

Always Protected

No need to connect each device

📱

All Devices

Smart TVs, IoT, game consoles

🎮

Low Latency

Minimal impact on gaming

🔧

Set & Forget

Configure once for all

Prerequisites

📋 Before You Begin

pfSense Version

  • pfSense 2.5.0 or newer
  • pfSense Plus 21.02 or newer
  • Community Edition supported

TorGuard Account

  • Active VPN subscription
  • VPN username & password
  • Access to config generator

Network Access

  • Admin access to pfSense
  • Ability to modify firewall
  • Router reboot permission

Version Compatibility

🔧 Supported pfSense Versions

pfSense 2.5.x

✅ Full Support

pfSense 2.6.x

✅ Full Support

pfSense Plus 21.x

✅ Full Support

pfSense Plus 22.x

✅ Full Support

pfSense Plus 23.x

✅ Full Support

pfSense 2.4.x

⚠️ Manual Install

Network Overview

🌐 How It Works

Internet → pfSense (WireGuard) → TorGuard VPN → Protected Traffic

All devices on your network automatically use the VPN connection

Step-by-Step Configuration

1

Log into pfSense

Access your pfSense web interface using your router's IP address (typically 192.168.1.1)

2

Install WireGuard Package

Navigate to System → Package Manager → Available Packages

Search for "wireguard" and click Install:

Install WireGuard Package

💡 Installation Tip

The installation may take 1-2 minutes. Wait for the success message before proceeding.

3

Create WireGuard Tunnel

Navigate to VPN → WireGuard and click +Add Tunnel

Enable ✓ Checked
Description TorGuard VPN
Listen Port Leave blank (auto-assign)
Interface Keys Click Generate to create new keys

Click Save Tunnel after generating keys

4

Add VPN Peer

Click Peers tab, then +Add Peer:

Add Peer
5

Generate TorGuard Config

Visit the TorGuard Config Generator:

  1. Select WireGuard as tunnel type
  2. Choose your server location or enter Dedicated IP
  3. Enter your TorGuard VPN credentials
  4. Click Generate Config
Config Generator

⚠️ Important

Keep this config file handy - you'll need values from it in the next step

6

Configure Peer Settings

Enter the following settings from your generated config:

Enable ✓ Checked
Tunnel Select tun_wg0 (TorGuard VPN)
Description TorGuard VPN
Dynamic Endpoint ☐ Unchecked
Endpoint IP from your config file
Endpoint Port 1443
Keep Alive 25
Public Key From [Peer] section of config
Allowed IPs 0.0.0.0/0

Click Save Peer:

Peer Configuration
7

Enable WireGuard

Go to Settings tab, check "Enable WireGuard" and click Save:

Enable WireGuard
8

Assign Interface

Navigate to Interfaces → Assignments

Click +Add next to tun_wg0 and click Save

The interface will be assigned as OPT1 or similar

9

Configure Interface

Click the OPT1 link to configure:

  • ✓ Check Enable
  • Change description to WG_TG
10

Set Static IP

Configure the interface IP settings:

  1. Set IPv4 Configuration Type to Static IPv4
  2. Set IPv4 Address to the IP from [Interface] section of your config (e.g., 10.13.65.217/32)
  3. Next to IPv4 Upstream Gateway, click +Add a new gateway
  4. Gateway name: WG_TG_GWV4
  5. Gateway IPv4: Same as IPv4 Address (e.g., 10.13.65.217)
  6. Click Add

Click Save and Apply Changes:

Interface Configuration
11

Configure LAN MSS

Navigate to Interfaces → LAN

Set MSS to 1412

Click Save and Apply Changes

💡 Why MSS?

This prevents packet fragmentation issues with WireGuard's overhead

12

Configure NAT Rules

Navigate to Firewall → NAT → Outbound

  1. Select Manual Outbound NAT rule generation
  2. Click Save and Apply Changes
NAT Configuration

For each existing rule under Mappings:

  1. Click Copy button
  2. Change Interface to WG_TG
  3. Click Save

Click Apply Changes after copying all rules:

NAT Rules
13

Fix Routing (If Needed)

If traffic doesn't route through the tunnel:

🔧 Routing Table Fix

  1. Go to System → Routing → Gateway Groups
  2. Add new group with:
    • VPN interface: Tier 1 priority
    • WAN interface: Tier 2 priority
    • Trigger: Packet Loss
  3. Apply changes
  4. Go to System → Routing
  5. Set new group as Default IPv4 Gateway
  6. Apply changes
Gateway Group Configuration

Verify Connection

✅ Test Your VPN

  1. From any device on your network, visit https://torguard.net/whats-my-ip.php
  2. Verify your IP has changed to the VPN server location
  3. Check for DNS leaks at dnsleaktest.com

Performance Optimization

⚡ Maximize Speed

  • MTU Tuning: Experiment with MSS values (1380-1420)
  • Hardware: Enable hardware crypto if available
  • CPU: WireGuard uses single core - higher frequency better
  • Server Selection: Choose closest server for lowest latency
  • Port: 1443 generally performs well

Troubleshooting

🔍 Common Issues

No Internet Access

  • Check NAT rules copied correctly
  • Verify gateway configuration
  • Ensure WireGuard enabled
  • Apply routing fix (Step 13)

Tunnel Not Connecting

  • Verify endpoint IP correct
  • Check public key from config
  • Ensure port 1443 not blocked
  • Regenerate config if needed

Slow Speeds

  • Lower MSS value
  • Try different server
  • Check CPU usage
  • Disable unnecessary rules

DNS Issues

  • Set DNS in System → General
  • Use TorGuard DNS servers
  • Disable DNS rebinding protection
  • Clear DNS cache

Handshake But No Traffic

  • Apply routing fix (Step 13)
  • Check firewall rules
  • Verify allowed IPs is 0.0.0.0/0
  • Restart WireGuard service

Random Disconnects

  • Increase keepalive to 30-60
  • Check for duplicate IPs
  • Monitor system logs
  • Update pfSense

Security Best Practices

🔐 Important Security Tips

  • Firewall Rules: Only allow necessary traffic through VPN
  • DNS: Use TorGuard's DNS to prevent leaks
  • Kill Switch: Configure failover to block traffic if VPN drops
  • Updates: Keep pfSense and WireGuard package updated
  • Monitoring: Check logs regularly for issues

Quick Reference

📋 Configuration Summary

WireGuard Settings

  • Port: 1443
  • Keepalive: 25
  • Allowed IPs: 0.0.0.0/0

Interface Settings

  • Type: Static IPv4
  • Subnet: /32
  • MSS: 1412

Required Changes

  • Manual NAT rules
  • Gateway group (if needed)
  • LAN MSS adjustment

Need Help?

If you're having trouble setting up WireGuard on pfSense:

Contact Support

Include your pfSense version and any error messages

Was this article helpful?

Share:

Ready to Get Help?

Our support team is available 24/7 to assist you with any questions.