Connect pfSense
With pfSense’s WireGuard package, your firewall connects to your address and lets through to your network only the ports you map.
Guide in preparation
Status of this guide
We have written the pfSense steps from the vendor’s documentation, but part of them has not been tried on a device yet. We publish them here as soon as they pass that test. In the meantime, the general steps below work.
What we already know: rules on a WireGuard interface with a gateway send the replies back through the same tunnel, so pfSense works for “Inbound only” and for “Inbound, keeping the client’s address”. When you add the device, the panel shows a pfSense recipe with your configuration’s values.
The general steps
Load the configuration
If your device accepts WireGuard files, import the
.confas it is. If not, create a WireGuard interface with your private key (thePrivateKeyline) and the tunnel address (theAddressline).Add your node as a peer
On that interface add a peer with your node’s public key (
PublicKey), the preshared key (PresharedKey), theEndpointfrom your file (your address and port51820), theAllowedIPsfrom your file and a keepalive of 25 seconds.Check the route into the tunnel
Some routers do not create routes from
AllowedIPs. If yours does not, add a route to10.77.0.0/24through the tunnel interface.Let the tunnel traffic through
In the device’s firewall, allow what arrives through the tunnel from
10.77.0.1to the devices and ports you are going to map. The rule goes before any rule that blocks.Check the handshake
In the panel, inside your site, the device shows its last handshake a few seconds ago. If it still says “Never connected” after a couple of minutes, see when there is no handshake.