Skip to main content

Posts

Showing posts from October, 2022

Mikrotik - Setting up wireguard

Wireguard is a fast, secure, versatile, and easy to set-up VPN  Software which (luckily) is unclided in MikroTik's RouterOS since v7. First, set up the router: [archy@MikroTik] > interface/wireguard/add comment="wireguard wan" listen-port=13231 name=wg0 Get the autogenerated public key for the wireguard interface and save it in a variable: [archy@stealth-falcon ~]$ gateway_publickey=$(ssh archy@gw.archyslife.lan 'interface/wireguard/print' | grep -iE 'public-key' | sed -s 's/public-key=//g' | sed -s 's/"//g' | sed -s 's/\ //g') By default, the 'wireguard-tools' package is not installed on fedora so we have to install it: [archy@stealth-falcon ~]$ sudo dnf -4y --refresh install wireguard-tools Also, ensure systemd-resolved is running: [archy@stealth-falcon ~]$ sudo systemctl enable --now systemd-resolved.service Create the private and public keys: [archy@stealth-falcon ~]$ client_privatekey=$(wg genkey)