Community discussions

MikroTik App
just joined
Topic Author
Posts: 12
Joined: Sat Feb 24, 2018 9:23 am

How to create a wireguard client

Thu Nov 19, 2020 11:24 am


I have installed router os which have the wireguard capability. I need to know how can I create a wiregaurd client in order to connect to my wiregaurd server
just joined
Posts: 13
Joined: Thu Dec 06, 2018 3:09 pm

Re: How to create a wireguard client

Sat Nov 21, 2020 12:55 am

1. Generate a new keypair on a system with wg command
$ wg genkey | tee privatekey | wg pubkey > publickey
2. Add a peer with newly generated publickey on the server

3. Use the following configuration template on mikrotik - replace listen-port, private-key (mikrotik's private key), allowed-address, endpoint, public-key (endpoint's public key)
/interface wireguard
add listen-port=12345 mtu=1420 name=wireguard1 private-key="abc=="

/interface wireguard peers
add allowed-address= endpoint= interface=wireguard1 persistent-keepalive=5 public-key="abc=="

Who is online

Users browsing this forum: No registered users and 7 guests