Best Wireguard Config Generator

This tool allows you to quickly generate complete WireGuard VPN configurations for MikroTik routers and multiple client devices. Simply enter your server details, network information, and the number of clients you need. The tool will automatically create unique key pairs, peer settings, and ready-to-use configuration files for each user.

You can preview the generated configuration directly in the browser and download client files individually or all at once in a ZIP package. It also provides QR codes for easy import into mobile WireGuard apps.

Whether you’re setting up a small remote-access VPN or deploying multiple peers, this generator helps automate the process, reduce errors, and speed up configuration with just a few clicks.

How to Use the MikroTik WireGuard Config Generator

  1. Open the tool interface.
  2. Fill in the server information:
    • Server: Enter your server’s public domain or IP.
    • Port: Specify the WireGuard port number.
    • Interface Name: Name of the WireGuard interface on MikroTik.
  3. Configure the network details:
    • Net: Base network for WireGuard clients.
    • 1stIP: First IP to begin assigning to clients.
    • Clients: Number of client configurations you want to generate.
  4. Add additional settings:
    • Allowed Net(s): Networks that peer devices will be allowed to access.
    • DNS: DNS server address for clients.
  5. Keys:
    • You can provide your own keys or allow the tool to automatically create the server and client keys.
    • Server PrivateKey and Server PublicKey are shown. You may copy or replace these values if needed.
  6. Click the Generate button:
    • The tool will generate configurations for all clients, including keys and addresses.
    • The server configuration will be displayed along with client information.
  7. Download configurations:
    • You can download all client config files as a ZIP archive.
    • You can also download QR codes for quick import on mobile devices.
  8. Apply configuration:
    • Copy and execute the generated server configuration in your MikroTik terminal.
    • Install client config files into WireGuard client applications on desktop or mobile.

This tool helps streamline the WireGuard setup process and provides ready-to-use configurations with minimal effort.

Server:
Port:
Interface Name:
Net:
1stIP:
Clients:
Allowed Net(s):
DNS:
ServerPrivateKey:
ServerPublicKey:

Server config {{ server }}:{{ port }}

/interface wireguard
add listen-port={{ port }} mtu=1420 name={{interfacename}} private-key="{{ serverkeys.privateKey }}"

/ip firewall filter
add action=accept chain=input comment="Allow Wireguard from All" dst-port={{port}} protocol=udp
add action=accept chain=input comment="Allow DNS from Wireguard Users" dst-port=53 in-interface={{interfacename}} protocol=udp

/ip address
add address={{ network }}.1/24 comment="Wireguard Interface" interface={{ interfacename }} network={{ network }}.0

/interface wireguard peers
{{ line }}

add allowed-address={{ network }}.{{ client }}/32 comment="{{ value.name }}" endpoint-address={{ network }}.{{ client }} interface={{interfacename}} public-key="{{ value.publicKey }}" preshared-key="{{ value.preSharedKey }}"

Client configs (first ip: {{network}}.{{startip}}, count: {{ clientcount }})

[Interface]
## {{ value.name }}
Address = {{ network }}.{{ client }}/32
PrivateKey = {{ value.privateKey }}
DNS = {{ dns }}
[Peer]
PublicKey = {{ serverkeys.publicKey }}
PreSharedKey = {{ value.preSharedKey }}
AllowedIPs = {{ network }}.1/32,{{allowednets}}
Endpoint = {{ server }}:{{ port }}
PersistentKeepalive = 10

All rights reserved