Skip to content

Ansible Playbook to set up a simple wireguard vpn on an ubuntu server.

License

Notifications You must be signed in to change notification settings

MarcHeiden/simple-wireguard-vpn

Repository files navigation

simple-wireguard-vpn

Ansible Playbook to set up a simple wireguard vpn on an ubuntu server.

Inspired by ansible-easy-vpn

What does the playbook do?

  • Setup ssh key authentification and hardening ssh
  • Install basic ufw rules
  • Configure wireguard and generate client config files and qrcodes which can be found under ~/wireguard on your local machine

Usage

> ansible-playbook run.yml

Prerequisites

Install ansible

> sudo apt-get install ansible

Install required ansible collections

> ansible-galaxy install -r requirements.yml

Customization

  • Add your servers to the inventory

  • Edit the variables in group_vars/vars.yml

  • Create a vault.yml file inside group_vars and provide your credentials:

    # file: group_vars/vault.yml
    ---
    vault_new_ansible_user_password: ""
    vault_user_password: ""
    vault_ssh_key_passphrase_: ""
    vault_localhost_password: ""
    vault_ssh_password1: ""
    vault_ssh_password2: ""

    and encrypt the file with:

    > ansible-vault encrypt group_vars/vault.yml

About

Ansible Playbook to set up a simple wireguard vpn on an ubuntu server.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages