Skip to main content

How to set up WireGuard® on OpenWRT Router

Set up & Config fetching

  1. Install WireGuard support -> open the OpenWrt web interface, sign in, and go to SystemSoftwareActionsUpdate lists…

  2. In the Filter field, type WireGuard, locate and install the wireguard-tools, kmod-wireguard, and luci-proto-wireguard packages.

  3. Restart your router.

  4. Configure the WireGuard interface -> Go to Network -> Interfaces -> Add new interface…

  5. Give the new interface a name (such as mysterwg) and select WireGuard VPN Protocol dropdown menu. Click Create interface when you’re done.

    Add new interface dialog in OpenWrt with the WireGuard VPN protocol selected and “Create interface” button highlighted.

    • General Settings tab, click on the Load configuration... button.


      Import your WireGuard configuration

      Now paste the MysteriumVPN config settings you downloaded earlier ⬇️


      Then, click on the Import settings button.

    • Advanced Settings tab, set MTU to 1412.

    • Peers tab, click Edit next to the imported peer configuration, check the Route Allowed IPs option, set Persistent Keep Alive to 25 and click Save.

    • Click Save & Apply

Firewall Setup

  1. Go to Network → Firewall.

  2. Click Add to create a new zone.

  3. Use these settings:

    • Name: mysterwg

    • Input: Reject

    • Output: Accept

    • Forward: Reject

    • Masquerading: Checked

    • MSS clamping: Checked

    • Covered networks: Select your WireGuard interface (mysterwg)

    • Allow forward from source zones: lan

    • Click Save & Apply

    Killswitch (optional)

    Edit the lan zone:

    In Allow forward to destination zones, remove wan and keep only the mysterwg zone. This prevents leaks if the VPN drops.


    If adjusted, click Save & Apply again

DNS Configuration

  1. Go to Network → Interfaces.

  2. Click Edit next to the WAN interface.

  3. In the Advanced Settings tab, uncheck Use DNS servers advertised by peer.

  4. Add a custom DNS server: 1.1.1.1

  5. Click Save.

  6. Click Save & Apply

Confirm the connection

Go to Network → Interfaces and check that your mysterwg interface is UP and shows traffic (RX/TX).

Run an IP and DNS leak test via one of your devices connected to your OpenWRT router.

Did this answer your question?