GemiGuard VPN
Get started
TelegramSignal

All router guides

Set up GemiGuard VPN on MikroTik RouterOS 7

Upload your configuration file, a small file with your connection settings, to the router and import it. Every device behind the router then goes through GemiGuard VPN.

Tested on RouterOS 7.25.1 on 7 November 2026.

Before you start

  • RouterOS 7.19 or later for the configuration file import. On older RouterOS 7, use the manual setup further down.
  • Access to WebFig or WinBox and its Terminal.
  • The default configuration with the WAN interface list, as MikroTik ships its home routers.
  • A GemiGuard VPN account with time on it. The router uses one of your five device slots.

Steps

  1. Download a configuration file for the router

    In your account, open Devices and choose Add device. Give it a name such as MikroTik, keep Create the key in this browser (download a configuration file) and add it.

    Download the configuration file of the server you want. The file is named after the server, for example frankfurt1.conf.

  2. Upload the file

    In WebFig, open Files and click Upload under Actions, then choose the .conf file. Upload only one .conf file: the next command imports the one it finds.

    WebFig Files page with “Upload...” outlined and frankfurt1.conf in the list
  3. Import it

    Open Terminal and paste this line:

    /interface/wireguard/wg-import config-file=[/file/get [find name~"\\.conf\$"] name]
    WireGuard peer created by the import, with the server address and port 51820
  4. Name the interface

    This renames the new interface to gemiguard, so the following commands find it:

    /interface/wireguard/set [find name~"^wg[0-9]+\$"] name=gemiguard

    If you already use other WireGuard interfaces on this router, run /interface/wireguard/print and rename only the new one.

  5. Send all traffic through the tunnel

    Paste these three lines one after another. The first keeps the route to our server on your normal connection, using the server address from the import and your current gateway. The other two send everything else through gemiguard.

    /ip/route/add dst-address=[/interface/wireguard/peers/get [find interface=gemiguard] endpoint-address] gateway=[/ip/route/get [find dst-address=0.0.0.0/0 active] gateway] comment=gemiguard-server
    /ip/route/add dst-address=0.0.0.0/1 gateway=gemiguard comment=gemiguard
    /ip/route/add dst-address=128.0.0.0/1 gateway=gemiguard comment=gemiguard
    Routes after the commands: the server through your gateway, 0.0.0.0/1 and 128.0.0.0/1 through gemiguard
  6. Treat the tunnel as WAN and set DNS

    The first line adds gemiguard to the WAN list, so the default firewall and masquerade rules cover it. The second makes the router use 1.1.1.1.

    /interface/list/member/add list=WAN interface=gemiguard
    /ip/dns/set servers=1.1.1.1

Check that it works

  • In your account, open Devices: Last connected for the router shows a time from the last minute or two.
  • On a computer behind the router, open ip.gemiguard.com: it shows your public IP address, which should be the address of the server you chose.
  • In the Terminal, /interface/wireguard/peers/print detail shows the rx counter growing.

If the tunnel goes down

The two routes through gemiguard stay in place while the tunnel reconnects, so all traffic waits for the VPN.

Manual setup for RouterOS older than 7.19

  1. Create the interface in the Terminal: /interface/wireguard/add name=gemiguard mtu=1420
  2. Show its public key with /interface/wireguard/print. In your account, add a device, choose Use my device’s public key and paste it.
  3. Open Server details for manual setup for the server you want. In WebFig, open WireGuard, Peers, New: interface gemiguard, the server public key, the preshared key, the endpoint address and port from Server details, allowed address 0.0.0.0/0 and persistent keepalive 25s.
  4. Open IP, Addresses, New: your device address from the account with /32, interface gemiguard.
  5. Then continue with steps 5 and 6 above.

Troubleshooting

The import answers bad parameter file
RouterOS 7.25 calls the parameter config-file, as in step 3. Older MikroTik documentation shows file=.
RouterOS does not know wg-import
It needs RouterOS 7.19 or later. Upgrade, or use the manual setup above.
Devices behind the router have no internet
Check that gemiguard is in the WAN list (/interface/list/member/print) and that the default masquerade rule exists (/ip/firewall/nat/print shows out-interface-list=WAN).
I want another server
Remove the setup with the commands below. Choose New key on the device in your account, download that server’s configuration file and repeat steps 2 to 6.

Switch it off

Paste these lines to remove everything the guide added:

/ip/route/remove [find comment~"gemiguard"]
/interface/list/member/remove [find interface=gemiguard]
/ip/address/remove [find interface=gemiguard]
/interface/wireguard/peers/remove [find interface=gemiguard]
/interface/wireguard/remove [find name=gemiguard]
/ip/dns/set servers=""

Get a configuration file for your router

One device slot covers every device behind the router. 6 months cost 29 USDT, 12 months 49 USDT, 24 months 79 USDT.

Get startedPricing

Guides for other routers