Closed DSIW closed 6 years ago
I checked out the commit fee009688ecd2f3b02518f828ee472e15e56f26b and it works now.
Working line: https://github.com/trailofbits/algo/blame/fee009688ecd2f3b02518f828ee472e15e56f26b/roles/vpn/tasks/openssl.yml#L41
Why did you close this issue? I think it should work on the master branch, too?!
Oh, I thought you were saying that it works?
I have the same problem on repeated tries:
: Name the vpn server:
What region should the server be located in?
Do you want to enable VPN On Demand when connected to cellular networks?
Do you want to enable VPN On Demand when connected to Wi-Fi?
Do you want to install a local DNS resolver to block ads while surfing?
Do you want each user to have their own account for SSH tunneling?
Do you want to apply operating system security enhancements on the server? (warning: replaces your sshd_config)
Do you want the VPN to support Windows 10 clients? (requires RSA certificates and key exchange, less secure)
Do you want to store the CA key? (required for update-users script, but less secure)
PLAY [Configure the server] ****
TASK [setup] *** ok: [localhost]
TASK [Generate the SSH private key] **** ok: [localhost -> localhost]
TASK [Generate the SSH public key] ***** ok: [localhost -> localhost]
TASK [Change mode for the SSH private key] ***** ok: [localhost -> localhost]
TASK [Ensure the dynamic inventory exists] ***** ok: [localhost]
TASK [cloud-digitalocean : Set the DigitalOcean Access Token fact] ***** ok: [localhost]
TASK [cloud-digitalocean : Delete the existing Algo SSH keys] ** FAILED - RETRYING: TASK: cloud-digitalocean : Delete the existing Algo SSH keys (10 retries left). ok: [localhost]
TASK [cloud-digitalocean : Upload the SSH key] ***** changed: [localhost]
TASK [cloud-digitalocean : Creating a droplet...] ** changed: [localhost]
TASK [cloud-digitalocean : Add the droplet to an inventory group] ** changed: [localhost]
TASK [cloud-digitalocean : set_fact] *** ok: [localhost]
TASK [cloud-digitalocean : Tag the groplet] **** changed: [localhost]
TASK [cloud-digitalocean : Get droplets] *** ok: [localhost]
TASK [cloud-digitalocean : Ensure the group digitalocean exists in the dynamic inventory file] *** ok: [localhost]
TASK [cloud-digitalocean : Populate the dynamic inventory] ***** ok: [localhost] => (item={u'status': u'active', u'kernel': None, u'volume_ids': [], u'locked': False, u'name': u'london', u'backup_ids': [], u'created_at': u'2017-03-31T18:23:45Z', u'snapshot_ids': [23847936, 29529520], u'size_slug': u'512mb', u'networks': {u'v4': [{u'type': u'public', u'netmask': u'255.255.240.0', u'ip_address': u'139.59.162.253', u'gateway': u'139.59.160.1'}], u'v6': [{u'type': u'public', u'netmask': 64, u'ip_address': u'2A03:B0C0:0001:00A1:0000:0000:162F:D001', u'gateway': u'2a03:b0c0:0001:00a1:0000:0000:0000:0001'}]}, u'next_backup_window': None, u'vcpus': 1, u'size': {u'price_monthly': 5.0, u'available': True, u'transfer': 1.0, u'price_hourly': 0.00744, u'regions': [u'ams2', u'ams3', u'blr1', u'fra1', u'lon1', u'nyc1', u'nyc2', u'nyc3', u'sfo1', u'sfo2', u'sgp1', u'tor1'], u'vcpus': 1, u'memory': 512, u'disk': 20, u'slug': u'512mb'}, u'image': {u'min_disk_size': 20, u'name': u'16.04.2 x64', u'created_at': u'2017-03-27T12:46:50Z', u'slug': None, u'regions': [u'nyc1', u'sfo1', u'nyc2', u'ams2', u'sgp1', u'lon1', u'nyc3', u'ams3', u'fra1', u'tor1', u'sfo2', u'blr1'], u'id': 23754420, u'distribution': u'Ubuntu', u'type': u'snapshot', u'public': False, u'size_gigabytes': 0.33}, u'memory': 512, u'region': {u'available': True, u'sizes': [u'512mb', u'1gb', u'2gb', u's-1vcpu-3gb', u'c-2', u'4gb', u'c-4', u'8gb', u'c-8', u'16gb', u'm-16gb', u'c-16', u'm-32gb', u'32gb', u'48gb', u'c-32', u'm-64gb', u'64gb', u'm-128gb', u'm-224gb'], u'slug': u'lon1', u'name': u'London 1', u'features': [u'private_networking', u'backups', u'ipv6', u'metadata', u'install_agent', u'storage']}, u'disk': 20, u'id': 44328999, u'tags': [u'Environment:Algo'], u'features': [u'ipv6']}) ok: [localhost] => (item={u'status': u'active', u'kernel': None, u'volume_ids': [], u'locked': False, u'name': u'eastcoast', u'backup_ids': [], u'created_at': u'2017-04-03T15:00:37Z', u'snapshot_ids': [24140233], u'size_slug': u'512mb', u'networks': {u'v4': [{u'type': u'public', u'netmask': u'255.255.240.0', u'ip_address': u'138.197.109.166', u'gateway': u'138.197.96.1'}], u'v6': [{u'type': u'public', u'netmask': 64, u'ip_address': u'2604:A880:0800:00A1:0000:0000:0BCD:2001', u'gateway': u'2604:A880:0800:00A1:0000:0000:0000:0001'}]}, u'next_backup_window': None, u'vcpus': 1, u'size': {u'price_monthly': 5.0, u'available': True, u'transfer': 1.0, u'price_hourly': 0.00744, u'regions': [u'ams2', u'ams3', u'blr1', u'fra1', u'lon1', u'nyc1', u'nyc2', u'nyc3', u'sfo1', u'sfo2', u'sgp1', u'tor1'], u'vcpus': 1, u'memory': 512, u'disk': 20, u'slug': u'512mb'}, u'image': {u'min_disk_size': 20, u'name': u'16.04.2 x64', u'created_at': u'2017-03-27T12:46:50Z', u'slug': None, u'regions': [u'nyc1', u'sfo1', u'nyc2', u'ams2', u'sgp1', u'lon1', u'nyc3', u'ams3', u'fra1', u'tor1', u'sfo2', u'blr1'], u'id': 23754420, u'distribution': u'Ubuntu', u'type': u'snapshot', u'public': False, u'size_gigabytes': 0.33}, u'memory': 512, u'region': {u'available': True, u'sizes': [u'512mb', u'1gb', u'2gb', u's-1vcpu-3gb', u'c-2', u'4gb', u'c-4', u'8gb', u'c-8', u'16gb', u'm-16gb', u'c-16', u'm-32gb', u'32gb', u'48gb', u'c-32', u'm-64gb', u'64gb', u'm-128gb', u'm-224gb'], u'slug': u'nyc3', u'name': u'New York 3', u'features': [u'private_networking', u'backups', u'ipv6', u'metadata', u'install_agent', u'storage']}, u'disk': 20, u'id': 44624326, u'tags': [u'Environment:Algo'], u'features': [u'ipv6']}) changed: [localhost] => (item={u'status': u'active', u'kernel': None, u'volume_ids': [], u'locked': False, u'name': u'uknew', u'backup_ids': [], u'created_at': u'2017-11-22T01:18:48Z', u'snapshot_ids': [], u'size_slug': u'512mb', u'networks': {u'v4': [{u'type': u'public', u'netmask': u'255.255.192.0', u'ip_address': u'46.101.0.67', u'gateway': u'46.101.0.1'}], u'v6': [{u'type': u'public', u'netmask': 64, u'ip_address': u'2A03:B0C0:0001:00D0:0000:0000:0033:E001', u'gateway': u'2A03:B0C0:0001:00D0:0000:0000:0000:0001'}]}, u'next_backup_window': None, u'vcpus': 1, u'size': {u'price_monthly': 5.0, u'available': True, u'transfer': 1.0, u'price_hourly': 0.00744, u'regions': [u'ams2', u'ams3', u'blr1', u'fra1', u'lon1', u'nyc1', u'nyc2', u'nyc3', u'sfo1', u'sfo2', u'sgp1', u'tor1'], u'vcpus': 1, u'memory': 512, u'disk': 20, u'slug': u'512mb'}, u'image': {u'min_disk_size': 20, u'name': u'16.04.3 x64', u'created_at': u'2017-11-22T00:43:22Z', u'slug': u'ubuntu-16-04-x64', u'regions': [u'nyc1', u'sfo1', u'nyc2', u'ams2', u'sgp1', u'lon1', u'nyc3', u'ams3', u'fra1', u'tor1', u'sfo2', u'blr1'], u'id': 29529053, u'distribution': u'Ubuntu', u'type': u'snapshot', u'public': True, u'size_gigabytes': 0.31}, u'memory': 512, u'region': {u'available': True, u'sizes': [u'512mb', u'1gb', u'2gb', u's-1vcpu-3gb', u'c-2', u'4gb', u'c-4', u'8gb', u'c-8', u'16gb', u'm-16gb', u'c-16', u'm-32gb', u'32gb', u'48gb', u'c-32', u'm-64gb', u'64gb', u'm-128gb', u'm-224gb'], u'slug': u'lon1', u'name': u'London 1', u'features': [u'private_networking', u'backups', u'ipv6', u'metadata', u'install_agent', u'storage']}, u'disk': 20, u'id': 71951659, u'tags': [u'Environment:Algo'], u'features': [u'ipv6']})
TASK [Wait until SSH becomes ready...] ***** ok: [localhost -> localhost]
TASK [A short pause, in order to be sure the instance is ready] **** Pausing for 10 seconds (ctrl+C then 'C' = continue early, ctrl+C then 'A' = abort) ok: [localhost]
TASK [Ensure the local ssh directory is exist] ***** ok: [localhost -> localhost]
TASK [Copy the algo ssh key to the local ssh directory] **** ok: [localhost -> localhost]
TASK [Configure the local ssh config] ** changed: [localhost -> localhost]
PLAY [Configure the server and install required software] **
TASK [Check the system] **** changed: [46.101.0.67]
TASK [Ubuntu | Install prerequisites] ** changed: [46.101.0.67]
TASK [Ubuntu | Configure defaults] ***** changed: [46.101.0.67]
TASK [FreeBSD / HardenedBSD | Install prerequisites] *** skipping: [46.101.0.67]
TASK [FreeBSD / HardenedBSD | Configure defaults] ** skipping: [46.101.0.67]
TASK [set_fact] **** skipping: [46.101.0.67]
TASK [Ensure the algo ssh key exist on the server] ***** ok: [46.101.0.67]
TASK [set_fact] **** ok: [46.101.0.67]
TASK [common : Gather Facts] *** ok: [46.101.0.67]
TASK [common : Install software updates] *** changed: [46.101.0.67]
TASK [common : Check if reboot is required] **** changed: [46.101.0.67]
TASK [common : Reboot] ***** skipping: [46.101.0.67]
TASK [common : Wait until SSH becomes ready...] **** skipping: [46.101.0.67]
TASK [common : Disable MOTD on login and SSHD] ***** changed: [46.101.0.67] => (item={u'regexp': u'^session.optional.pam_motd.so.', u'line': u'# MOTD DISABLED', u'file': u'/etc/pam.d/login'}) changed: [46.101.0.67] => (item={u'regexp': u'^session.optional.pam_motd.so.', u'line': u'# MOTD DISABLED', u'file': u'/etc/pam.d/sshd'})
TASK [common : Loopback for services configured] *** changed: [46.101.0.67]
TASK [common : Loopback included into the network config] ** changed: [46.101.0.67]
RUNNING HANDLER [common : restart loopback] **** changed: [46.101.0.67]
TASK [common : set_fact] *** ok: [46.101.0.67]
TASK [common : set_fact] *** skipping: [46.101.0.67]
TASK [common : Loopback included into the rc config] *** skipping: [46.101.0.67]
TASK [common : Enable the gateway features] **** skipping: [46.101.0.67] => (item={u'value': u'"YES"', u'param': u'firewall_enable'}) skipping: [46.101.0.67] => (item={u'value': u'"open"', u'param': u'firewall_type'}) skipping: [46.101.0.67] => (item={u'value': u'"YES"', u'param': u'gateway_enable'}) skipping: [46.101.0.67] => (item={u'value': u'"YES"', u'param': u'natd_enable'}) skipping: [46.101.0.67] => (item={u'value': u'""', u'param': u'natd_interface'}) skipping: [46.101.0.67] => (item={u'value': u'"-dynamic -m"', u'param': u'natd_flags'})
TASK [common : Install tools] ** changed: [46.101.0.67] => (item=[u'git', u'screen', u'apparmor-utils', u'uuid-runtime', u'coreutils', u'sendmail', u'iptables-persistent', u'cgroup-tools', u'openssl'])
TASK [common : Enable packet forwarding for IPv4] ** changed: [46.101.0.67] => (item=net.ipv4.ip_forward) changed: [46.101.0.67] => (item=net.ipv4.conf.all.forwarding) changed: [46.101.0.67] => (item=net.ipv6.conf.all.forwarding)
TASK [vpn : Gather Facts] ** ok: [46.101.0.67]
TASK [vpn : Enable IPv6] *** ok: [46.101.0.67]
TASK [vpn : Generate password for the CA key] ** changed: [46.101.0.67]
TASK [vpn : set_fact] ** ok: [46.101.0.67]
TASK [vpn : Change the algorithm to RSA] *** skipping: [46.101.0.67]
TASK [vpn : Ensure that the strongswan group exist] **** changed: [46.101.0.67]
TASK [vpn : Ensure that the strongswan user exist] ***** changed: [46.101.0.67]
TASK [vpn : set_fact] ** ok: [46.101.0.67]
TASK [vpn : Ubuntu | Install StrongSwan] *** changed: [46.101.0.67]
TASK [vpn : Ubuntu | Enforcing ipsec with apparmor] **** skipping: [46.101.0.67] => (item=/usr/lib/ipsec/charon) skipping: [46.101.0.67] => (item=/usr/lib/ipsec/lookip) skipping: [46.101.0.67] => (item=/usr/lib/ipsec/stroke)
TASK [vpn : Ubuntu | Enable services] ** ok: [46.101.0.67] => (item=apparmor) ok: [46.101.0.67] => (item=strongswan) ok: [46.101.0.67] => (item=netfilter-persistent)
TASK [vpn : Ubuntu | Ensure that the strongswan service directory exist] *** changed: [46.101.0.67]
TASK [vpn : Ubuntu | Setup the cgroup limitations for the ipsec daemon] **** changed: [46.101.0.67]
TASK [vpn : Iptables configured] *** changed: [46.101.0.67] => (item={u'dest': u'/etc/iptables/rules.v4', u'src': u'rules.v4.j2'})
TASK [vpn : Iptables configured] *** changed: [46.101.0.67] => (item={u'dest': u'/etc/iptables/rules.v6', u'src': u'rules.v6.j2'})
TASK [vpn : FreeBSD / HardenedBSD | Get the existing kernel parameters] **** skipping: [46.101.0.67]
TASK [vpn : FreeBSD / HardenedBSD | Set the rebuild_needed fact] *** skipping: [46.101.0.67] => (item=IPSEC) skipping: [46.101.0.67] => (item=IPSEC_NAT_T) skipping: [46.101.0.67] => (item=crypto)
TASK [vpn : FreeBSD / HardenedBSD | Make the kernel config] **** skipping: [46.101.0.67]
TASK [vpn : FreeBSD / HardenedBSD | Ensure the all options are enabled] **** skipping: [46.101.0.67] => (item=options IPSEC) skipping: [46.101.0.67] => (item=options IPSEC_NAT_T) skipping: [46.101.0.67] => (item=device crypto)
TASK [vpn : HardenedBSD | Determine the sources] *** skipping: [46.101.0.67]
TASK [vpn : FreeBSD | Determine the sources] *** skipping: [46.101.0.67]
TASK [vpn : FreeBSD / HardenedBSD | Increase the git postBuffer size] ** skipping: [46.101.0.67]
TASK [vpn : FreeBSD / HardenedBSD | Fetching the sources...] *** skipping: [46.101.0.67]
TASK [vpn : FreeBSD / HardenedBSD | Fetching the sources...] *** skipping: [46.101.0.67]
TASK [vpn : FreeBSD / HardenedBSD | The kernel is being built...] ** skipping: [46.101.0.67]
TASK [vpn : FreeBSD / HardenedBSD | The kernel is being built...] ** skipping: [46.101.0.67]
TASK [vpn : FreeBSD / HardenedBSD | Reboot] **** skipping: [46.101.0.67]
TASK [vpn : FreeBSD / HardenedBSD | Enable strongswan] ***** skipping: [46.101.0.67]
TASK [vpn : Install StrongSwan] **** ok: [46.101.0.67]
TASK [vpn : Setup the config files from our templates] ***** changed: [46.101.0.67] => (item={u'dest': u'/etc/strongswan.conf', u'src': u'strongswan.conf.j2', u'group': u'root', u'mode': u'0644', u'owner': u'root'}) changed: [46.101.0.67] => (item={u'dest': u'/etc/ipsec.conf', u'src': u'ipsec.conf.j2', u'group': u'root', u'mode': u'0644', u'owner': u'root'}) changed: [46.101.0.67] => (item={u'dest': u'/etc/ipsec.secrets', u'src': u'ipsec.secrets.j2', u'group': u'root', u'mode': u'0600', u'owner': u'strongswan'})
TASK [vpn : Get loaded plugins] **** changed: [46.101.0.67]
TASK [vpn : Disable unneeded plugins] ** changed: [46.101.0.67] => (item=xcbc) skipping: [46.101.0.67] => (item=kernel-netlink) changed: [46.101.0.67] => (item=updown) skipping: [46.101.0.67] => (item=sha2) changed: [46.101.0.67] => (item=gmp) skipping: [46.101.0.67] => (item=x509) changed: [46.101.0.67] => (item=md4) changed: [46.101.0.67] => (item=agent) changed: [46.101.0.67] => (item=connmark) skipping: [46.101.0.67] => (item=random) skipping: [46.101.0.67] => (item=pgp) skipping: [46.101.0.67] => (item=pkcs7) changed: [46.101.0.67] => (item=fips-prf) changed: [46.101.0.67] => (item=sshkey) changed: [46.101.0.67] => (item=sha1) skipping: [46.101.0.67] => (item=nonce) changed: [46.101.0.67] => (item=md5) skipping: [46.101.0.67] => (item=aes) changed: [46.101.0.67] => (item=resolve) changed: [46.101.0.67] => (item=constraints) skipping: [46.101.0.67] => (item=socket-default) skipping: [46.101.0.67] => (item=stroke) skipping: [46.101.0.67] => (item=pkcs8) skipping: [46.101.0.67] => (item=pubkey) changed: [46.101.0.67] => (item=pkcs1) skipping: [46.101.0.67] => (item=pem) skipping: [46.101.0.67] => (item=revocation) skipping: [46.101.0.67] => (item=gcm) changed: [46.101.0.67] => (item=dnskey) skipping: [46.101.0.67] => (item=hmac) changed: [46.101.0.67] => (item=attr) changed: [46.101.0.67] => (item=test-vectors) changed: [46.101.0.67] => (item=rc2) skipping: [46.101.0.67] => (item=openssl) skipping: [46.101.0.67] => (item=pkcs12)
TASK [vpn : Ensure that required plugins are enabled] ** skipping: [46.101.0.67] => (item=xcbc) changed: [46.101.0.67] => (item=kernel-netlink) skipping: [46.101.0.67] => (item=updown) changed: [46.101.0.67] => (item=sha2) skipping: [46.101.0.67] => (item=gmp) changed: [46.101.0.67] => (item=x509) skipping: [46.101.0.67] => (item=md4) skipping: [46.101.0.67] => (item=agent) skipping: [46.101.0.67] => (item=connmark) changed: [46.101.0.67] => (item=random) changed: [46.101.0.67] => (item=pgp) changed: [46.101.0.67] => (item=pkcs7) skipping: [46.101.0.67] => (item=fips-prf) skipping: [46.101.0.67] => (item=sshkey) skipping: [46.101.0.67] => (item=sha1) changed: [46.101.0.67] => (item=nonce) skipping: [46.101.0.67] => (item=md5) changed: [46.101.0.67] => (item=aes) skipping: [46.101.0.67] => (item=resolve) skipping: [46.101.0.67] => (item=constraints) changed: [46.101.0.67] => (item=socket-default) changed: [46.101.0.67] => (item=stroke) changed: [46.101.0.67] => (item=pkcs8) changed: [46.101.0.67] => (item=pubkey) skipping: [46.101.0.67] => (item=pkcs1) changed: [46.101.0.67] => (item=pem) changed: [46.101.0.67] => (item=revocation) changed: [46.101.0.67] => (item=gcm) skipping: [46.101.0.67] => (item=dnskey) changed: [46.101.0.67] => (item=hmac) skipping: [46.101.0.67] => (item=attr) skipping: [46.101.0.67] => (item=test-vectors) skipping: [46.101.0.67] => (item=rc2) changed: [46.101.0.67] => (item=openssl) changed: [46.101.0.67] => (item=pkcs12)
TASK [vpn : Ensure the pki directory is not exist] ***** skipping: [46.101.0.67]
TASK [vpn : Ensure the pki directories are exist] ** changed: [46.101.0.67 -> localhost] => (item=ecparams) changed: [46.101.0.67 -> localhost] => (item=certs) changed: [46.101.0.67 -> localhost] => (item=crl) changed: [46.101.0.67 -> localhost] => (item=newcerts) changed: [46.101.0.67 -> localhost] => (item=private) changed: [46.101.0.67 -> localhost] => (item=reqs)
TASK [vpn : Ensure the files are exist] **** changed: [46.101.0.67 -> localhost] => (item=.rnd) changed: [46.101.0.67 -> localhost] => (item=private/.rnd) changed: [46.101.0.67 -> localhost] => (item=index.txt) changed: [46.101.0.67 -> localhost] => (item=index.txt.attr) changed: [46.101.0.67 -> localhost] => (item=serial)
TASK [vpn : Generate the openssl server configs] *** changed: [46.101.0.67 -> localhost]
TASK [vpn : Build the CA pair] ***** fatal: [46.101.0.67 -> localhost]: FAILED! => {"changed": true, "cmd": "openssl ecparam -name prime256v1 -out ecparams/prime256v1.pem &&\n openssl req -utf8 -new -newkey ec:ecparams/prime256v1.pem -config openssl.cnf -keyout private/cakey.pem -out cacert.pem -x509 -days 3650 -batch -passout pass:\"4a9d5ba6d021\" &&\n touch 46.101.0.67_ca_generated", "delta": "0:00:00.012697", "end": "2017-11-21 20:31:15.955196", "failed": true, "rc": 1, "start": "2017-11-21 20:31:15.942499", "stderr": "error on line 113 of openssl.cnf\n140736235479944:error:0E065068:configuration file routines:STR_COPY:variable has no value:/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-22/libressl/crypto/conf/conf_def.c:573:line 113", "stdout": "", "stdout_lines": [], "warnings": []}
RUNNING HANDLER [vpn : restart strongswan] *****
RUNNING HANDLER [vpn : daemon-reload] **
RUNNING HANDLER [vpn : restart iptables] ***
PLAY RECAP *****
46.101.0.67 : ok=36 changed=26 unreachable=0 failed=1
localhost : ok=20 changed=6 unreachable=0 failed=0
Same problem here. GCE, setting up from OSX High Sierra.
No point in posting the logs; others have them. seems like it happens regardless of the settings...
Did you happen to install a different version of openssl, libressl, or boringssl via homebrew?
I'm also seeing this issue trying to add a user. I do have the latest version of openssl install via brew
This works from the last two major versions of macOS and Ubuntu. This appears to be an Arch specific issue so I'm closing this ticket. Please let me know if you get to the bottom of it! We only officially support the last 2 major versions of macOS, Ubuntu, and, on a best effort basis, Windows Services for Linux (WSL).
My submissions are from the latest version of macOS, with no outstanding updates.
Incorrectly closed.
Sent from my iPad
On Dec 28, 2017, at 18:42, Dan Guido notifications@github.com wrote:
Closed #729.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
OS / Environment
Local computer: Linux 4.11.5-1-ARCH Python 2.7 DigitalOcean Droplet: 512 MB Memory / 20 GB Disk / FRA1 - Ubuntu 16.04.3 x64
Ansible version
2.2.0.0
Version of components from
requirements.txt
Summary of the problem
Deploy failed with error message. See log below.
Steps to reproduce the behavior
./algo
The way of deployment (cloud or local)
cloud (DigitalOcean)
Expected behavior
Actual behavior
I get this error message:
Full log