Install the necessary packages1 pkg_add wireguard-tools vimEnable IP Forwarding1 2 sysctl net.inet.ip.forwarding=1 echo 'net.inet.ip.forwarding=1' >> /etc/sysctl.confMake a directory to store your wg keys1 2 mkdir ~/wg && cd wg wg genkey | tee .private | wg pubkey > .publicCreate the wireguard interface1 vim /etc/hostname.<INTERFACE_NAME>In the interface file setup the basics1 2 3 4 5 6 7 # Server setup inet <IP_ADDRESS> <SUBNET_MASK> wgkey <SERVER_PRIVATE_KEY> wgport <WG_PORT> # Peer setup wgpeer <CLIENT_PUBLIC_KEY> wgaip <ALLOWED_IP>/32