iamckn / wireguard_ansible

Ansible scripts for the set up a typical wireguard VPN connection
https://www.ckn.io/blog/2017/11/14/wireguard-vpn-typical-setup/
322 stars 69 forks source link

Lost original ansible install directory and need to add clients #23

Open th3joker opened 2 years ago

th3joker commented 2 years ago

I've lost my original ansible install directory and need to add more clients how can I do this?

I've tried manually creating the public and private keys and adding to /etc/wireguard/wg0.conf but when you restart the service it reverts to the original wg0.conf

iamckn commented 2 years ago

The process is specified here https://www.ckn.io/blog/2017/11/14/wireguard-vpn-typical-setup/

Generate the keys - wg genkey | tee new_client_private_key | wg pubkey > new_client_public_key Register them on the server | wg set wg0 peer allowed-ips /32 Finally create your new client config file.