Introduction
Once your MikroTik router (running RouterOS v7+) has a Mozfactor Dedicated Static Public IP, you can turn it into your own central WireGuard VPN Server so remote laptops, smartphones, and branch routers can securely access your office or home network.
Step 1: Configure WireGuard Server on MikroTik
A. Create the WireGuard Interface
Open WinBox → New Terminal and run (RouterOS v7 generates the keypair automatically):
/interface/wireguard/add name=wg-server listen-port=13234
/interface/wireguard/print
Copy the generated server Public Key.
B. Assign a Local VPN Gateway IP
/ip/address/add address=10.10.10.1/24 interface=wg-server
C. Allow UDP Port 13234 in Firewall Input
/ip/firewall/filter/add chain=input protocol=udp dst-port=13234 action=accept comment="Allow WireGuard Server" place-before=0
D. Enable NAT Masquerade (Optional)
/ip/firewall/nat/add chain=srcnat src-address=10.10.10.0/24 out-interface=ether1-wan action=masquerade comment="NAT WireGuard Clients"
Step 2: Configure the WireGuard Client
- Open the official WireGuard app on Windows, macOS, Android, or iOS.
- Click Add Tunnel → Add empty tunnel... and copy the auto-generated Client Public Key.
- Fill in the configuration:
[Interface]
PrivateKey = <Auto_Generated_Client_Private_Key>
Address = 10.10.10.2/32
DNS = 8.8.8.8, 1.1.1.1
[Peer]
PublicKey = <MikroTik_Server_Public_Key>
Endpoint = <Your_Mozfactor_Public_IP>:13234
AllowedIPs = 0.0.0.0/0
PersistentKeepalive = 25
Step 3: Register the Client Peer on MikroTik
/interface/wireguard/peers/add interface=wg-server public-key="CLIENT_PUBLIC_KEY" allowed-address=10.10.10.2/32 comment="Admin-Laptop"
Step 4: Activate & Test
Click Activate on your client device and test pinging 10.10.10.1 or reaching your local LAN servers.