Skip to content
LunoVPN
Router setup

Set up a WireGuard VPN on your router

Put LunoVPN on your router and every device on your home network goes through the VPN: PlayStation, Xbox, smart TVs, Roku, speakers and guests, none of which can run a VPN app. Pick your router below for the exact steps.

Short answer

To set up a WireGuard VPN on a router, download a WireGuard config from LunoVPN and import it into the router’s WireGuard client. On OpenWrt, add a WireGuard VPN interface and load the configuration; on GL.iNet, add it under VPN Client; on ASUS (Asuswrt 388 or newer), import it under VPN Fusion. pfSense, OPNsense and MikroTik need a tunnel, a gateway and a NAT rule. The router then sends all home traffic through one tunnel using one device slot.

Updated · by the LunoVPN team

Before you start

What you need

  • A router with a WireGuard client. OpenWrt, GL.iNet, ASUS with Asuswrt 388 or newer, Asuswrt-Merlin, pfSense, OPNsense and MikroTik RouterOS 7 all have one. Most routers supplied by internet providers do not.
  • A LunoVPN WireGuard config. Get one from the WireGuard config page; the steps are on this page.
  • A few minutes and access to the router’s admin page.
Step by step

Pick your router

Menu names change between firmware versions; the steps below match current releases.

OpenWrt

  1. Install luci-proto-wireguard under System › Software and reboot if asked.
  2. Go to Network › Interfaces › Add new interface and choose protocol WireGuard VPN.
  3. Click Load configuration… and paste the config, or drop the .conf file.
  4. On the peer, keep Route Allowed IPs on.
  5. Put the interface in the wan firewall zone, then Save & Apply.

For a kill switch, give the tunnel its own firewall zone with masquerading and allow forwarding from lan to that zone only, not to wan. If the tunnel drops, traffic stops instead of leaking.

GL.iNet

  1. Open the admin panel and go to VPN › VPN Client (older firmware: WireGuard Client).
  2. Add a WireGuard provider or configuration, then upload the .conf or paste its contents.
  3. Switch the profile on. The status turns green once the handshake completes.

Newer GL.iNet firmware has an option to block non-VPN traffic in the VPN dashboard. Turn it on so devices do not fall back to your normal connection if the tunnel drops.

ASUS

  1. Make sure the router runs Asuswrt 388.x or newer, or Asuswrt-Merlin. Older firmware has no WireGuard client.
  2. Go to VPN › VPN Fusion (or VPN Client) and add a profile with type WireGuard.
  3. Use Import config file and pick the downloaded .conf.
  4. Apply and activate the profile.

pfSense

  1. Install the WireGuard package under System › Package Manager.
  2. Under VPN › WireGuard › Tunnels, add a tunnel with the PrivateKey from the config.
  3. Add a peer with the server’s PublicKey, the Endpoint IP and port, Allowed IPs 0.0.0.0/0 and keepalive 25.
  4. Under Interfaces › Assignments, assign the tunnel, enable it and give it the Address from the config as a static IPv4.
  5. Add a gateway on that interface, an outbound NAT rule for your LAN through it, and a LAN firewall rule that uses the new gateway.

OPNsense

  1. Under VPN › WireGuard › Peers, add the server: PublicKey, Endpoint IP and port, Allowed IPs 0.0.0.0/0, keepalive 25.
  2. Under Instances, add your side: the PrivateKey and the tunnel Address, and select the peer. Enable WireGuard.
  3. Assign the WireGuard interface under Interfaces › Assignments and enable it.
  4. Create a gateway for it, an outbound NAT rule for your LAN, and a LAN rule that sends traffic through the gateway.

MikroTik

RouterOS 7 has WireGuard built in. Replace the values in capitals with the ones from your lunovpn.conf and your LAN range.

/interface wireguard add name=lunovpn private-key="PRIVATE_KEY" /interface wireguard peers add interface=lunovpn public-key="SERVER_PUBLIC_KEY" \ endpoint-address=SERVER_IP endpoint-port=PORT allowed-address=0.0.0.0/0 \ persistent-keepalive=25s /ip address add address=TUNNEL_ADDRESS interface=lunovpn /routing table add name=vpn fib /ip route add dst-address=0.0.0.0/0 gateway=lunovpn routing-table=vpn /routing rule add src-address=192.168.88.0/24 action=lookup table=vpn /ip firewall nat add chain=srcnat out-interface=lunovpn action=masquerade /ip dns set servers=DNS_FROM_CONFIG

The routing rule sends only your LAN through the tunnel, so the router itself keeps its normal connection for management and updates.

After setup

Check it actually works

  1. From a phone or laptop on your Wi-Fi, open what is my IP. It should show the VPN server’s location, not your provider.
  2. Run the DNS leak test. If your provider’s resolvers appear, devices are still getting your ISP’s DNS from the router’s DHCP server; point it at the resolver from the config.
  3. Pull the plug on the tunnel and reload a page. With a kill switch it should fail; without one, it silently loads over your normal connection.
Honest limits

What a router VPN will not do

  • The router’s CPU sets the speed. A router that moves 900 Mbps unencrypted may manage 100–200 Mbps through WireGuard. See what makes a router good for WireGuard.
  • It only covers devices at home. Phones on mobile data need the LunoVPN app. One subscription covers both: the router takes one slot, the other four are free.
  • No obfuscation. Plain WireGuard is easy to recognise. On networks that block VPNs, use the app with obfuscation or LunoGuard MAD.
FAQ

Common questions

Can I put a VPN on my router?
Yes, if the router has a WireGuard client: OpenWrt, GL.iNet, ASUS with Asuswrt 388 or newer, Asuswrt-Merlin, pfSense, OPNsense and MikroTik RouterOS 7 all do. Import a LunoVPN WireGuard config and every device on the network goes through the VPN.
How do I set up WireGuard on OpenWrt?
Install luci-proto-wireguard, add a new interface with protocol WireGuard VPN, use Load configuration to import the LunoVPN config, keep Route Allowed IPs on and put the interface in the wan firewall zone.
How do I use a VPN on a GL.iNet router?
In the GL.iNet admin panel go to VPN › VPN Client (older firmware: WireGuard Client), add a WireGuard configuration, upload the LunoVPN .conf file and switch it on.
Does my ASUS router support a WireGuard VPN client?
ASUS routers on Asuswrt 388.x or newer, and Asuswrt-Merlin, have a WireGuard client under VPN Fusion or VPN Client. Older firmware does not.
How many devices does a router VPN cover?
Every device connected to the router, using one of your five LunoVPN device slots.
Will a VPN on my router slow down my internet?
Usually somewhat, because the router’s processor does the encryption. WireGuard is the lightest option, but a budget router may cap at 100 to 200 Mbps.
LunoVPN

One config. Every device at home.

Download a WireGuard config, import it on your router, and the whole house is covered with one device slot.

Get a WireGuard config See pricing