pfSense / OPNsense Setup
This guide walks through setting up the Get Real IP WireGuard tunnel on pfSense or OPNsense so your entire network routes inbound traffic through your static public IP. The steps are shown for pfSense — OPNsense differences are noted where they apply.
Step 1 — Download your config
Section titled “Step 1 — Download your config”From the dashboard, open your tunnel and click Download Config (Full Tunnel). Open the .conf file in a text editor — you’ll need these values for the pfSense fields:
- PrivateKey (under
[Interface]) — your WireGuard private key - Address (under
[Interface]) — your static IP (e.g.134.49.198.16/32) - PublicKey (under
[Peer]) — the server’s public key - Endpoint (under
[Peer]) — the server address (e.g.turnpike.getrealip.net:51834)
Step 2 — Add a WireGuard tunnel in pfSense
Section titled “Step 2 — Add a WireGuard tunnel in pfSense”-
Go to VPN → WireGuard
-
Click Add Tunnel
-
Fill in:
- Description:
Get Real IP - Listen Port: Leave blank (pfSense will assign one — outbound only)
- Interface Keys: Paste the private key from your downloaded config file (the
PrivateKeyline under[Interface])
- Description:
-
Click Save Tunnel
Note the Interface name pfSense assigns (e.g. tun_wg0).
Step 3 — Add a peer
Section titled “Step 3 — Add a peer”Still in VPN → WireGuard, click the Peers tab, then Add Peer:
| Field | Value |
|---|---|
| Tunnel | Select the tunnel you just created |
| Description | Get Real IP Server |
| Endpoint | turnpike.getrealip.net |
| Endpoint Port | 51834 |
| Keep Alive | 25 |
| Public Key | (server public key from your config/dashboard) |
| Allowed IPs | 0.0.0.0/0 |
Click Save Peer.
Step 4 — Assign the WireGuard interface
Section titled “Step 4 — Assign the WireGuard interface”-
Go to Interfaces → Assignments
-
Find the WireGuard tunnel interface in the Available network ports list
-
Click Add, then click the interface name to configure it
-
Set:
- Enable: ✓ checked
- Description:
GETREALIP(or whatever you prefer) - IPv4 Configuration Type: Static IPv4
- IPv4 Address: Your static IP (e.g.
134.49.198.16) with/32 - IPv4 Upstream Gateway: Click Add a new gateway, name it
GETREALIP_GW, and set the gateway IP to the same static IP
-
Click Save, then Apply Changes
Step 5 — Add a firewall rule on the WireGuard interface
Section titled “Step 5 — Add a firewall rule on the WireGuard interface”- Go to Firewall → Rules → GETREALIP (or whatever you named the interface)
- Click Add
- Set:
- Action: Pass
- Interface: GETREALIP
- Protocol: Any
- Source: Any
- Destination: Any
- Click Save, then Apply Changes
This allows inbound traffic arriving on the WireGuard interface to pass through.
Step 6 — Add an outbound NAT rule
Section titled “Step 6 — Add an outbound NAT rule”For inbound traffic to reach LAN devices, pfSense needs to NAT traffic from the WireGuard interface onto your LAN.
- Go to Firewall → NAT → Outbound
- Switch to Hybrid Outbound NAT mode
- Click Add to create a new rule:
- Interface: GETREALIP
- Source: Your LAN subnet (e.g.
192.168.1.0/24) - Translation / Address: Interface Address
- Click Save, then Apply Changes
Step 7 — Port forwarding (optional)
Section titled “Step 7 — Port forwarding (optional)”To expose specific services on LAN machines:
- Go to Firewall → NAT → Port Forward
- Click Add:
- Interface: GETREALIP
- Protocol: TCP (or UDP, or both)
- Destination: GETREALIP address
- Destination Port Range: Your service port (e.g.
443) - Redirect Target IP: Your LAN device (e.g.
192.168.1.100) - Redirect Target Port: Same port
- Click Save, then Apply Changes
Step 8 — Verify
Section titled “Step 8 — Verify”From a device outside your network, try to reach your static IP on the port you forwarded. You can also check from inside:
curl -4 https://api.ipify.orgThis should return your Get Real IP static address if your default route goes through the tunnel.
Troubleshooting
Section titled “Troubleshooting”Tunnel shows “No Handshake” in the peer list:
- Verify the endpoint hostname resolves: Diagnostics → DNS Lookup →
turnpike.getrealip.net - Check that UDP 51834 is allowed outbound on your WAN firewall rules
- Confirm the public key in pfSense matches what’s in your dashboard
Handshake succeeds but traffic doesn’t reach LAN devices:
- Check the outbound NAT rule is correct and applied
- Verify port forward rules have associated firewall rules (pfSense usually creates them automatically — check Firewall → Rules → GETREALIP)
- Check that the target LAN device’s default gateway is pfSense