Skip to content

Commit cb256c1

Browse files
committed
Merge remote-tracking branch 'origin/master' into 196-simple-webapp-config
2 parents 2271e41 + 9ac64cb commit cb256c1

File tree

21 files changed

+139
-43
lines changed

21 files changed

+139
-43
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
runs-on: ubuntu-16.04
3030
strategy:
3131
matrix:
32-
UBUNTU_VERSION: ["18.04", "19.10"]
32+
UBUNTU_VERSION: ["18.04", "20.04"]
3333
steps:
3434
- uses: actions/checkout@v1
3535
- uses: actions/setup-python@v1
@@ -98,7 +98,7 @@ jobs:
9898
runs-on: ubuntu-16.04
9999
strategy:
100100
matrix:
101-
UBUNTU_VERSION: ["18.04", "19.10"]
101+
UBUNTU_VERSION: ["18.04", "20.04"]
102102
steps:
103103
- uses: actions/checkout@v1
104104
- uses: actions/setup-python@v1

config.cfg

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ reduce_mtu: 0
4949
# /etc/systemd/system/dnsmasq.service.d/100-CustomLimitations.conf
5050
adblock_lists:
5151
- "https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts"
52-
- "https://hosts-file.net/ad_servers.txt"
5352

5453
# Enable DNS encryption.
5554
# If 'false', 'dns_servers' should be specified below.
@@ -157,10 +156,14 @@ SSH_keys:
157156
cloud_providers:
158157
azure:
159158
size: Standard_B1S
160-
image: 19.10-DAILY
159+
image:
160+
publisher: Canonical
161+
offer: 0001-com-ubuntu-server-focal-daily
162+
sku: 20_04-daily-lts
163+
version: latest
161164
digitalocean:
162165
size: s-1vcpu-1gb
163-
image: "ubuntu-19-10-x64"
166+
image: "ubuntu-20-04-x64"
164167
ec2:
165168
# Change the encrypted flag to "false" to disable AWS volume encryption.
166169
encrypted: true
@@ -169,31 +172,31 @@ cloud_providers:
169172
use_existing_eip: false
170173
size: t2.micro
171174
image:
172-
name: "ubuntu-eoan-19.10"
175+
name: "ubuntu-focal-20.04"
173176
owner: "099720109477"
174177
gce:
175178
size: f1-micro
176-
image: ubuntu-1910
179+
image: ubuntu-2004-lts
177180
external_static_ip: false
178181
lightsail:
179182
size: nano_1_0
180183
image: ubuntu_18_04
181184
scaleway:
182185
size: DEV1-S
183-
image: Ubuntu Bionic Beaver
186+
image: Ubuntu 20.04 Focal Fossa
184187
arch: x86_64
185188
hetzner:
186189
server_type: cx11
187-
image: ubuntu-18.04
190+
image: ubuntu-20.04
188191
openstack:
189192
flavor_ram: ">=512"
190193
image: Ubuntu-18.04
191194
cloudstack:
192195
size: Micro
193-
image: Linux Ubuntu 19.10 64-bit
196+
image: Linux Ubuntu 20.04 LTS 64-bit
194197
disk: 10
195198
vultr:
196-
os: Ubuntu 19.10 x64
199+
os: Ubuntu 20.04 x64
197200
size: 1024 MB RAM,25 GB SSD,1.00 TB BW
198201
local:
199202

docs/client-linux-wireguard.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,19 @@ sudo systemctl enable wg-quick@wg0
4949
```
5050

5151
If your Linux distribution does not use `systemd` you can bring up WireGuard with `sudo wg-quick up wg0`.
52+
53+
## Using a DNS Search Domain
54+
55+
As of the `v1.0.20200510` release of `wireguard-tools` WireGuard supports setting a DNS search domain. In your `wg0.conf` file a non-numeric entry on the `DNS` line will be used as a search domain. For example this:
56+
```
57+
DNS = 172.27.153.31, fd00::b:991f, mydomain.com
58+
```
59+
will cause your `/etc/resolv.conf` to contain:
60+
```
61+
search mydomain.com
62+
nameserver 172.27.153.31
63+
nameserver fd00::b:991f
64+
```
65+
If you're using the version of WireGuard included with Ubuntu as of 19.10 it might be from before this feature was added. To use the latest version of WireGuard add the PPA repository as shown above.
66+
67+
Note that using the PPA repository on Ubuntu 20.04 LTS instead of the WireGuard modules shipped in the kernel package may cause the installation of about 40 additional packages in order to compile the kernel module.

docs/deploy-to-ubuntu.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ You can use Algo to configure a pre-existing server as an AlgoVPN rather than us
44

55
To perform a local installation, install the Algo scripts following the normal installation instructions, then choose:
66
```
7-
Install to existing Ubuntu 18.04 or 19.10 server (for more advanced users)
7+
Install to existing Ubuntu 18.04 or 20.04 server (for more advanced users)
88
```
99
Make sure your target server is running an unmodified copy of the operating system version specified. The target can be the same system where you've installed the Algo scripts, or a remote system that you are able to access as root via SSH without needing to enter the SSH key passphrase (such as when using `ssh-agent`).
1010

docs/deploy-to-unsupported-cloud.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Algo officially supports the [cloud providers listed here](https://github.com/trailofbits/algo/blob/master/README.md#deploy-the-algo-server). If you want to deploy Algo on another virtual hosting provider, that provider must support:
44

5-
1. the base operating system image that Algo uses (Ubuntu 18.04 or 19.10), and
5+
1. the base operating system image that Algo uses (Ubuntu 18.04 or 20.04), and
66
2. a minimum of certain kernel modules required for the strongSwan IPsec server.
77

88
Please see the [Required Kernel Modules](https://wiki.strongswan.org/projects/strongswan/wiki/KernelModules) documentation from strongSwan for a list of the specific required modules and a script to check for them. As a first step, we recommend running their shell script to determine initial compatibility with your new hosting provider.

docs/troubleshooting.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,23 @@ The error is caused because Digital Ocean changed its API to treat the tag argum
223223
5. Finally run `doctl compute tag list` to make sure that the tag has been deleted
224224
6. Run algo as directed
225225

226+
### Azure: No such file or directory: '/home/username/.azure/azureProfile.json'
227+
228+
```
229+
TASK [cloud-azure : Create AlgoVPN Server] *****************************************************************************************************************************************************************
230+
An exception occurred during task execution. To see the full traceback, use -vvv.
231+
The error was: FileNotFoundError: [Errno 2] No such file or directory: '/home/ubuntu/.azure/azureProfile.json'
232+
fatal: [localhost]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):
233+
File \"/usr/local/lib/python3.6/dist-packages/azure/cli/core/_session.py\", line 39, in load
234+
with codecs_open(self.filename, 'r', encoding=self._encoding) as f:
235+
File \"/usr/lib/python3.6/codecs.py\", line 897, in open\n file = builtins.open(filename, mode, buffering)
236+
FileNotFoundError: [Errno 2] No such file or directory: '/home/ubuntu/.azure/azureProfile.json'
237+
", "module_stdout": "", "msg": "MODULE FAILURE
238+
See stdout/stderr for the exact error", "rc": 1}
239+
```
240+
241+
It happens when your machine is not authenticated in the azure cloud, follow this [guide](https://trailofbits.github.io/algo/cloud-azure.html) to configure your environment
242+
226243
### Windows: The value of parameter linuxConfiguration.ssh.publicKeys.keyData is invalid
227244

228245
You tried to deploy Algo from Windows and you received an error like this one:
@@ -266,7 +283,7 @@ TASK [wireguard : Generate public keys] ****************************************
266283
267284
fatal: [localhost]: FAILED! => {"msg": "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/xxx.xxx.xxx.xxx/wireguard//private/dan"}
268285
```
269-
This error is usually hit when using the local install option on a server that isn't Ubuntu 18.04. You should upgrade your server to Ubuntu 18.04. If this doesn't work, try removing `*.lock` files at /etc/wireguard/ as follows:
286+
This error is usually hit when using the local install option on a server that isn't Ubuntu 18.04 or later. You should upgrade your server to Ubuntu 18.04 or later. If this doesn't work, try removing `*.lock` files at /etc/wireguard/ as follows:
270287

271288
```ssh
272289
sudo rm -rf /etc/wireguard/*.lock

input.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
- { name: Scaleway, alias: scaleway}
2222
- { name: OpenStack (DreamCompute optimised), alias: openstack }
2323
- { name: CloudStack (Exoscale optimised), alias: cloudstack }
24-
- { name: "Install to existing Ubuntu 18.04 or 19.10 server (for more advanced users)", alias: local }
24+
- { name: "Install to existing Ubuntu 18.04 or 20.04 server (for more advanced users)", alias: local }
2525
vars_files:
2626
- config.cfg
2727

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
libstrongswan {
2+
x509 {
3+
enforce_critical = no
4+
}
5+
}

roles/client/tasks/main.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,14 @@
5353
notify:
5454
- restart strongswan
5555

56+
- name: Configure libstrongswan to relax CA constraints
57+
copy:
58+
src: libstrongswan-relax-constraints.conf
59+
dest: "{{ configs_prefix }}/strongswan.d/relax-ca-constraints.conf"
60+
owner: root
61+
group: root
62+
mode: 0644
63+
5664
- name: Setup the certificates and keys
5765
template:
5866
src: "{{ item.src }}"

roles/cloud-azure/files/deployment.json

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,18 @@
1111
"vmSize": {
1212
"type": "string"
1313
},
14+
"imageReferencePublisher": {
15+
"type": "string"
16+
},
17+
"imageReferenceOffer": {
18+
"type": "string"
19+
},
1420
"imageReferenceSku": {
1521
"type": "string"
1622
},
23+
"imageReferenceVersion": {
24+
"type": "string"
25+
},
1726
"SshPort": {
1827
"type": "int"
1928
},
@@ -182,10 +191,10 @@
182191
},
183192
"storageProfile": {
184193
"imageReference": {
185-
"publisher": "Canonical",
186-
"offer": "UbuntuServer",
194+
"publisher": "[parameters('imageReferencePublisher')]",
195+
"offer": "[parameters('imageReferenceOffer')]",
187196
"sku": "[parameters('imageReferenceSku')]",
188-
"version": "latest"
197+
"version": "[parameters('imageReferenceVersion')]"
189198
},
190199
"osDisk": {
191200
"createOption": "FromImage"

0 commit comments

Comments
 (0)