Page 1 of 1

How to create a wireguard client

Posted: Thu Nov 19, 2020 11:24 am
by mohands

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

Re: How to create a wireguard client

Posted: Sat Nov 21, 2020 12:55 am
by rb9999
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=="