Set up GetAStatic on OPNsense
Run your WireGuard tunnel on OPNsense. Then reach a server on your LAN from the internet, and send LAN traffic out from your static IP.
You need an active GetAStatic plan and admin access to OPNsense. Menu and field names follow the OPNsense manual for version 26 (October 2026). Where older versions use another name, it is in brackets.
Connect the tunnel
Download your config
Sign in to your dashboard. On the Devices tab, select the IP for OPNsense. Under step 2 Add to WireGuard, click Download Config. If the setup steps are closed, click Set up another device, or get the config again first.
Open the file in a text editor. It looks like this:
[Interface] PrivateKey = <your private key> Address = 10.x.x.x/32 DNS = 10.x.x.1 [Peer] PublicKey = <server public key> AllowedIPs = 0.0.0.0/0 Endpoint = <server>:1194 PersistentKeepalive = 25
If your file has no
DNSline, it is from an older download. Download it again. Use this config only on OPNsense: if another device runs it at the same time, both connect and disconnect.Add our server as a peer
In OPNsense, go to VPN → WireGuard → Peers and click +. Fill in:
- Name: any name, for example
GetAStatic - Public key: the
PublicKeyvalue - Allowed IPs:
0.0.0.0/0 - Endpoint address: the
Endpointvalue before the colon - Endpoint port: the number after the colon,
1194(or443if you downloaded the Port 443 config) - Keepalive:
25
Leave the other fields empty and click Save.
- Name: any name, for example
Add the instance
Go to VPN → WireGuard → Instances, click + and turn on advanced mode. Fill in:
- Name: any name, for example
GetAStatic - Private key: the
PrivateKeyvalue. Leave Public key empty. Do not click the cogwheel next to the keys: it makes a new key pair, and our server accepts only the key in your config. - Listen port: any unused port, for example
51820 - Tunnel address: the
Addressvalue, with the/32 - Peers: the peer you just added
- Disable routes: on. Without it, OPNsense sends all of its own traffic into the tunnel. The steps below choose what goes through it.
- Gateway: the
DNSvalue. This is our server's address inside the tunnel.
Click Save.
- Name: any name, for example
Turn WireGuard on
Go to VPN → WireGuard → General, enable WireGuard and click Apply.
Assign the interface
Go to Interfaces → Assignments. Under New interface, select the WireGuard device (for example
wg0), enter the descriptionSTATICIP, add it and click Save.Open Interfaces → STATICIP. Turn on Enable. Leave IPv4 Configuration Type and IPv6 Configuration Type at None: the interface gets the tunnel address from the instance. Click Save, then Apply changes. Then click Apply under VPN → WireGuard once more, so the tunnel starts on the new interface.
Add the gateway
Go to System → Gateways → Configuration and click Add:
- Name:
STATICIP_GW - Interface:
STATICIP - Address Family: IPv4
- IP address: the
DNSvalue again - Far Gateway: on
- Disable Gateway Monitoring: on
Click Save, then Apply changes.
- Name:
Check the tunnel
VPN → WireGuard → Status shows a handshake a few seconds ago, and the dashboard shows Connected under your IP. A handshake means our server answers.
Reach a server on your LAN
The example forwards HTTPS (TCP 443) to a web server at 192.168.1.10. Use your own port and server address.
Open the port on the dashboard
New IPs start with every inbound port closed. On the Devices tab, select the IP and open Settings. Next to Open ports, click the current value (All closed on a new IP). Select TCP, enter
443, click Add, then Save.Forward the port
Go to Firewall → NAT → Destination NAT (Port Forward) and add a rule:
- Interface:
STATICIP - Version: IPv4
- Protocol: TCP
- Destination address:
STATICIP address - Destination port:
443 - Redirect target IP:
192.168.1.10 - Redirect target port:
443 - Firewall rule: Manual (Filter rule association: None). You add the rule yourself in the next step, so that you can set Reply-to on it.
Click Save, then Apply.
- Interface:
Let it in, and send replies back through the tunnel
Go to Firewall → Rules, select the
STATICIPinterface and add a rule:- Action: Pass
- Direction: in
- Version: IPv4
- Protocol: TCP
- Source: any
- Destination:
192.168.1.10, the server, not your static IP. OPNsense checks the rule after the port forward. - Destination port:
443 - Reply-to:
STATICIP_GW
Leave Gateway at default. Click Save, then Apply changes.
Reply-to is the step that is easy to miss. Default is not enough on this interface. Without it, the server's replies go out through your normal internet line, and the connection never completes.
Check from outside
On the dashboard, click the Open ports value again. Enter
443in the box next to Port Test and click Port Test. TCP 443: open means our server reached your web server through the tunnel.To test it yourself, use a device outside your network, for example a phone on mobile data. A device on your LAN is not a good test.
Send LAN traffic out from your static IP
Without these steps, your LAN still goes out through your normal internet line. Skip them if you only need inbound. Use LAN net for the whole LAN, or one device's address.
Translate LAN traffic to the tunnel address
Go to Firewall → NAT → Source NAT (Outbound). Set the mode to Hybrid and click Save. Add a rule:
- Interface:
STATICIP - Version: IPv4
- Protocol: any
- Source: LAN net
- Destination: any
- Translation: Interface address
Click Save, then Apply changes.
- Interface:
Route that traffic into the tunnel
Go to Firewall → Rules, select LAN and add a rule above the default rule that allows the LAN out:
- Action: Pass
- Source: LAN net
- Destination: LAN net, with Invert on. Traffic to the router and to your LAN stays local.
- Gateway:
STATICIP_GW
Click Save, then Apply changes.
Check your static IP
On a LAN device, open our open port checker. Your public IPv4 must be the IP on your dashboard.
If inbound traffic does not arrive
- Capture on the tunnel address. Inbound traffic reaches OPNsense addressed to your tunnel address (the
Addressvalue), not to your static IP. In Interfaces → Diagnostics → Packet Capture, selectSTATICIPand filter on the port only. A filter on your static IP shows nothing. - Packets arrive, but the connection hangs: check Reply-to on the
STATICIPrule. - Nothing arrives: make sure the port is open for that IP on the dashboard and the tunnel has a recent handshake. Click Test connection on the Devices tab.
- The server gets the packets but does not answer: the service must listen on all interfaces (
0.0.0.0) or on its LAN address. The server's own firewall must allow the port, and its default gateway must be OPNsense.
Still stuck? Ask on the Support tab of your dashboard. Tell us the port and what the capture shows.