trailofbits / algo

Set up a personal VPN in the cloud
https://blog.trailofbits.com/2016/12/12/meet-algo-the-vpn-that-works/
GNU Affero General Public License v3.0
28.98k stars 2.32k forks source link

[WARNING]: Unable to find 'configs/35.196.155.197/wireguard//public/-' in expected paths #1153

Closed aadesousa closed 6 years ago

aadesousa commented 6 years ago

trying to install Algo and I am getting the double parentheses wiregaurd issue.

aadesousa@Adam:~/algo$ ./algo

PLAY [Ask user for the input] **

TASK [Gathering Facts] ***** ok: [localhost] [pause] What provider would you like to use?

  1. DigitalOcean
  2. Amazon EC2
  3. Vultr
  4. Microsoft Azure
  5. Google Compute Engine
  6. Scaleway
  7. OpenStack (DreamCompute optimised)
  8. Install to existing Ubuntu 18.04 server (Advanced)

Enter the number of your desired provider : 5

TASK [pause] *** ok: [localhost]

TASK [Set facts based on the input] **** ok: [localhost] [pause] Name the vpn server [algo] : adam

TASK [pause] *** ok: [localhost] [pause] Do you want macOS/iOS clients to enable "VPN On Demand" when connected to cellular networks? [y/N] : y

TASK [pause] *** ok: [localhost] [pause] Do you want macOS/iOS clients to enable "VPN On Demand" when connected to Wi-Fi? [y/N] : y

TASK [pause] *** ok: [localhost] [pause] List the names of trusted Wi-Fi networks (if any) that macOS/iOS clients exclude from using the VPN (e.g., your home network. Comma-separated value, e.g., HomeNet,OfficeWifi,AlgoWiFi) :

TASK [pause] *** ok: [localhost] [pause] Do you want to install a DNS resolver on this VPN server, to block ads while surfing? [y/N] : y

TASK [pause] *** ok: [localhost] [pause] Do you want each user to have their own account for SSH tunneling? [y/N] : n

TASK [pause] *** ok: [localhost] [pause] Do you want the VPN to support Windows 10 or Linux Desktop clients? (enables compatible ciphers and key exchange, less secure) [y/N] : y

TASK [pause] *** ok: [localhost] [pause] Do you want to retain the CA key? (required to add users in the future, but less secure) [y/N] : n

TASK [pause] *** ok: [localhost]

TASK [Set facts based on the input] **** ok: [localhost]

PLAY [Provision the server] ****

TASK [Gathering Facts] ***** ok: [localhost]

--> Please include the following block of text when reporting issues:

Algo running on: Ubuntu 18.04.1 LTS Created from git fork. Last commit: efc8dc7 add tags for the wireguard qr code task. variables fix (#1147) Python 2.7.15rc1 Runtime variables: algo_provider "gce" algo_ondemand_cellular "True" algo_ondemand_wifi "True" algo_ondemand_wifi_exclude "_null" algo_local_dns "True" algo_ssh_tunneling "False" algo_windows "True" wireguard_enabled "True" dns_encryption "True"

TASK [Display the invocation environment] ** changed: [localhost -> localhost]

TASK [Generate the SSH private key] **** ok: [localhost]

TASK [Generate the SSH public key] ***** ok: [localhost] [cloud-gce : pause] Enter the local path to your credentials JSON file (https://support.google.com/cloud/answer/6158849?hl=en&ref_topic=6262490#serviceaccounts) : /mnt/c/Users/aadesousa/AppData/Local/Microsoft/WindowsApps/My First Project-68330b4f4f1a.json

TASK [cloud-gce : pause] *** ok: [localhost]

TASK [cloud-gce : set_fact] **** ok: [localhost]

TASK [cloud-gce : set_fact] **** ok: [localhost]

TASK [cloud-gce : set_fact] **** ok: [localhost]

TASK [cloud-gce : Get regions] ***** ok: [localhost]

TASK [cloud-gce : Set facts about the regions] ***** ok: [localhost]

TASK [cloud-gce : Set facts about the default region] ** ok: [localhost] [cloud-gce : pause] What region should the server be located in? (https://cloud.google.com/compute/docs/regions-zones/)

  1. asia-east1-a
  2. asia-east1-b
  3. asia-east1-c
  4. asia-northeast1-a
  5. asia-northeast1-b
  6. asia-northeast1-c
  7. asia-south1-a
  8. asia-south1-b
  9. asia-south1-c
  10. asia-southeast1-a
  11. asia-southeast1-b
  12. asia-southeast1-c
  13. australia-southeast1-a
  14. australia-southeast1-b
  15. australia-southeast1-c
  16. europe-north1-a
  17. europe-north1-b
  18. europe-north1-c
  19. europe-west1-b
  20. europe-west1-c
  21. europe-west1-d
  22. europe-west2-a
  23. europe-west2-b
  24. europe-west2-c
  25. europe-west3-a
  26. europe-west3-b
  27. europe-west3-c
  28. europe-west4-a
  29. europe-west4-b
  30. europe-west4-c
  31. northamerica-northeast1-a
  32. northamerica-northeast1-b
  33. northamerica-northeast1-c
  34. southamerica-east1-a
  35. southamerica-east1-b
  36. southamerica-east1-c
  37. us-central1-a
  38. us-central1-b
  39. us-central1-c
  40. us-central1-f
  41. us-east1-b
  42. us-east1-c
  43. us-east1-d
  44. us-east4-a
  45. us-east4-b
  46. us-east4-c
  47. us-west1-a
  48. us-west1-b
  49. us-west1-c
  50. us-west2-a
  51. us-west2-b
  52. us-west2-c

Enter the number of your desired region [41] : 42

TASK [cloud-gce : pause] *** ok: [localhost]

TASK [cloud-gce : set_fact] **** ok: [localhost]

TASK [cloud-gce : Network configured] ** ok: [localhost]

TASK [cloud-gce : Creating a new instance...] ** ok: [localhost]

TASK [cloud-gce : set_fact] **** ok: [localhost]

TASK [Set subjectAltName as afact] ***** ok: [localhost]

TASK [Add the server to an inventory group] **** changed: [localhost]

TASK [Additional variables for the server] ***** changed: [localhost]

TASK [Wait until SSH becomes ready...] ***** ok: [localhost]

TASK [debug] *** ok: [localhost] => { "IP_subject_alt_name": "35.196.155.197" } Pausing for 20 seconds (ctrl+C then 'C' = continue early, ctrl+C then 'A' = abort) Press 'C' to continue the play or 'A' to abort

TASK [A short pause, in order to be sure the instance is ready] **** ok: [localhost]

PLAY [Configure the server and install required software] **

TASK [common : Check the system] *** changed: [35.196.155.197]

TASK [common : include_tasks] ** included: /home/aadesousa/algo/roles/common/tasks/ubuntu.yml for 35.196.155.197 ok: [35.196.155.197] => (item=[u'python2.7', u'sudo'])

TASK [common : Ubuntu | Install prerequisites] *****

TASK [common : Ubuntu | Configure defaults] **** ok: [35.196.155.197]

TASK [common : Gather facts] *** ok: [35.196.155.197]

TASK [common : Install software updates] *** ok: [35.196.155.197]

TASK [common : Check if reboot is required] **** changed: [35.196.155.197]

TASK [common : Install unattended-upgrades] **** ok: [35.196.155.197]

TASK [common : Configure unattended-upgrades] ** ok: [35.196.155.197]

TASK [common : Periodic upgrades configured] *** ok: [35.196.155.197]

TASK [common : Unattended reboots configured] ** ok: [35.196.155.197] ok: [35.196.155.197] => (item={u'regexp': u'^session.optional.pam_motd.so.', u'line': u'# MOTD DISABLED', u'file': u'/etc/pam.d/login'}) ok: [35.196.155.197] => (item={u'regexp': u'^session.optional.pam_motd.so.', u'line': u'# MOTD DISABLED', u'file': u'/etc/pam.d/sshd'})

TASK [common : Disable MOTD on login and SSHD] *****

TASK [common : Loopback for services configured] *** ok: [35.196.155.197] ok: [35.196.155.197] => (item=systemd-networkd) ok: [35.196.155.197] => (item=systemd-resolved)

TASK [common : systemd services enabled and started] ***

TASK [common : Check apparmor support] ***** changed: [35.196.155.197]

TASK [common : set_fact] *** ok: [35.196.155.197]

TASK [common : set_fact] *** ok: [35.196.155.197] ok: [35.196.155.197] => (item=git) ok: [35.196.155.197] => (item=screen) ok: [35.196.155.197] => (item=apparmor-utils) ok: [35.196.155.197] => (item=uuid-runtime) ok: [35.196.155.197] => (item=coreutils) ok: [35.196.155.197] => (item=iptables-persistent) ok: [35.196.155.197] => (item=cgroup-tools) ok: [35.196.155.197] => (item=openssl)

TASK [common : Install tools] ** ok: [35.196.155.197] => (item=[u'linux-headers-generic', u'linux-headers-4.15.0-1021-gcp'])

TASK [common : Install headers] ****

TASK [common : Generate password for the CA key] *** changed: [35.196.155.197 -> localhost]

TASK [common : Generate p12 export password] *** changed: [35.196.155.197 -> localhost]

TASK [common : Define facts] *** ok: [35.196.155.197]

TASK [common : set_fact] *** ok: [35.196.155.197]

TASK [common : Set IPv6 support as a fact] ***** ok: [35.196.155.197] ok: [35.196.155.197] => (item={u'item': u'net.ipv4.ip_forward', u'value': 1}) ok: [35.196.155.197] => (item={u'item': u'net.ipv4.conf.all.forwarding', u'value': 1}) ok: [35.196.155.197] => (item={u'item': u'net.ipv6.conf.all.forwarding', u'value': 1})

TASK [common : Sysctl tuning] **

TASK [dns_encryption : Include tasks for Ubuntu] *** included: /home/aadesousa/algo/roles/dns_encryption/tasks/ubuntu.yml for 35.196.155.197

TASK [dns_encryption : Add the repository] ***** ok: [35.196.155.197]

TASK [dns_encryption : Install dnscrypt-proxy] ***** ok: [35.196.155.197]

TASK [dns_encryption : Configure unattended-upgrades] ** ok: [35.196.155.197]

TASK [dns_encryption : Ubuntu | Unbound profile for apparmor configured] *** ok: [35.196.155.197]

TASK [dns_encryption : Ubuntu | Enforce the dnscrypt-proxy AppArmor policy] **** ok: [35.196.155.197]

TASK [dns_encryption : Ubuntu | Ensure that the dnscrypt-proxy service directory exist] **** ok: [35.196.155.197]

TASK [dns_encryption : Ubuntu | Add capabilities to bind ports] **** ok: [35.196.155.197]

TASK [dns_encryption : dnscrypt-proxy ip-blacklist configured] ***** ok: [35.196.155.197]

TASK [dns_encryption : dnscrypt-proxy configured] ** ok: [35.196.155.197]

TASK [dns_encryption : dnscrypt-proxy enabled and started] ***** ok: [35.196.155.197]

TASK [dns_adblocking : Dnsmasq installed] ** ok: [35.196.155.197]

TASK [dns_adblocking : The dnsmasq directory created] ** ok: [35.196.155.197]

TASK [dns_adblocking : include_tasks] ** included: /home/aadesousa/algo/roles/dns_adblocking/tasks/ubuntu.yml for 35.196.155.197

TASK [dns_adblocking : Ubuntu | Dnsmasq profile for apparmor configured] *** ok: [35.196.155.197]

TASK [dns_adblocking : Ubuntu | Enforce the dnsmasq AppArmor policy] *** changed: [35.196.155.197]

TASK [dns_adblocking : Ubuntu | Ensure that the dnsmasq service directory exist] *** ok: [35.196.155.197]

TASK [dns_adblocking : Ubuntu | Setup the cgroup limitations for the ipsec daemon] ***** ok: [35.196.155.197]

TASK [dns_adblocking : Dnsmasq configured] ***** ok: [35.196.155.197]

TASK [dns_adblocking : Adblock script created] ***** ok: [35.196.155.197]

TASK [dns_adblocking : Adblock script added to cron] *** ok: [35.196.155.197]

TASK [dns_adblocking : Update adblock hosts] *** changed: [35.196.155.197]

TASK [dns_adblocking : Dnsmasq enabled and started] **** ok: [35.196.155.197] ok: [35.196.155.197 -> localhost] => (item=private) ok: [35.196.155.197 -> localhost] => (item=public)

TASK [wireguard : Ensure the required directories exist] ***

TASK [wireguard : Include tasks for Ubuntu] **** included: /home/aadesousa/algo/roles/wireguard/tasks/ubuntu.yml for 35.196.155.197

TASK [wireguard : WireGuard repository configured] ***** ok: [35.196.155.197]

TASK [wireguard : WireGuard installed] ***** ok: [35.196.155.197]

TASK [wireguard : WireGuard reload-module-on-update] *** changed: [35.196.155.197]

TASK [wireguard : Configure unattended-upgrades] *** ok: [35.196.155.197]

TASK [wireguard : set_fact] **** ok: [35.196.155.197] ok: [35.196.155.197] => (item=-Adam) ok: [35.196.155.197] => (item=35.196.155.197)

TASK [wireguard : Generate private keys] *** ok: [35.196.155.197] => (item=-Adam) ok: [35.196.155.197] => (item=35.196.155.197)

TASK [wireguard : Generate public keys] **** ok: [35.196.155.197] => (item=None) ok: [35.196.155.197] => (item=None)

TASK [wireguard : Save public keys] **** [WARNING]: Unable to find 'configs/35.196.155.197/wireguard//public/-' in expected paths (use -vvvvv to see paths)

TASK [wireguard : WireGuard configured] **** fatal: [35.196.155.197]: FAILED! => {"changed": false, "msg": "AnsibleError: An unhandled exception occurred while running the lookup plugin 'file'. Error was a <class 'ansible.errors.AnsibleError'>, original message: could not locate file in lookup: configs/35.196.155.197/wireguard//public/-"}

PLAY RECAP ***** 35.196.155.197 : ok=58 changed=8 unreachable=0 failed=1 localhost : ok=34 changed=3 unreachable=0 failed=0

davidemyers commented 6 years ago

It might be because your user name starts with punctuation. Could you have left out a space between the minus sign and Adam in config.cfg?

ok: [35.196.155.197] => (item=-Adam)

aadesousa commented 6 years ago

Thanks this worked!

aadesousa commented 6 years ago

Where is the user powershell script?

davidemyers commented 6 years ago

All client configuration files generated by Algo will be in the configs directory in a directory with the name of the IP address of the Algo server they're associated with.