Skip to content
This repository has been archived by the owner on Jun 4, 2021. It is now read-only.

WIP: Ubuntu 1804 #1453

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -8,6 +8,7 @@ generated-docs
.DS_Store
.vagrant/
ubuntu-xenial-16.04-cloudimg-console.log
ubuntu-bionic-18.04-cloudimg-console.log

# Ignore changes to the existing server inventory to allow users to modify it
inventories/inventory-existing
Expand Down
6 changes: 3 additions & 3 deletions README-chs.md
Expand Up @@ -18,8 +18,8 @@ Streisand

Streisand介绍
---------------------
* 只需要一个简单的脚本,就能在全新的 Ubuntu 16.04 服务器上运行[多个不同的科学上网工具](#提供的服务),它们能够让你匿名并且加密所有的网络流量。
* Streisand 原生支持多个 VPS 供应商,其中包括[亚马逊EC2](https://aws.amazon.com/ec2/),[微软云服务](https://azure.microsoft.com),[DigitalOcean](https://www.digitalocean.com/),[Google云计算](https://cloud.google.com/compute/),[Linode](https://www.linode.com/)和[Rackspace](https://www.rackspace.com/);随着软件的开发还将支持更多云和VPS——只要运行的是 Ubuntu 16.04 ,不论提供商是谁还是有**成百个**实例都能用这个方法部署。
* 只需要一个简单的脚本,就能在全新的 Ubuntu 18.04 服务器上运行[多个不同的科学上网工具](#提供的服务),它们能够让你匿名并且加密所有的网络流量。
* Streisand 原生支持多个 VPS 供应商,其中包括[亚马逊EC2](https://aws.amazon.com/ec2/),[微软云服务](https://azure.microsoft.com),[DigitalOcean](https://www.digitalocean.com/),[Google云计算](https://cloud.google.com/compute/),[Linode](https://www.linode.com/)和[Rackspace](https://www.rackspace.com/);随着软件的开发还将支持更多云和VPS——只要运行的是 Ubuntu 18.04 ,不论提供商是谁还是有**成百个**实例都能用这个方法部署。
* 整个部署过程顺利的话大概在10分钟左右搞定。试想一个没有系统管理能力的人可能要花数天来完成其中一项工作,而我们用 Streisand 让你获得获得开箱既得的畅快体验。
* 一旦部署完成,你可以将使用指南发送给你的朋友,家人和你觉得对你重要的人**(译者注:原文是社会活动家)**。在这个指南中包含唯一的一个 SSL 证书,这也意味着你发送给他们的只是一个简单的文件而已。
* 部署好网关中包含了用户需要的一切内容,例如设置向导,所支持操作系统需要的客户端。即使无法下载到官方客户端的朋友都可以在网关中的镜像里下载到需要的最新版本客户端。
Expand Down Expand Up @@ -173,7 +173,7 @@ Streisand 运行在**你自己的计算机上时(或者你电脑的虚拟机

### 在其他的 VPS 供应商上运行 (高级使用)###

你同样可以将 Streisand 运行在其他 VPS 供应商(提供更好的硬件也没问题,奇葩的 VPS 供应商也行)的 16.04 Ubuntu 上,只需要你在运行 ./streisand 的时候选择菜单中的 "Existing Server (Advanced)" 就可以。你需要提供这个 VPS 的 IP 地址。
你同样可以将 Streisand 运行在其他 VPS 供应商(提供更好的硬件也没问题,奇葩的 VPS 供应商也行)的 18.04 Ubuntu 上,只需要你在运行 ./streisand 的时候选择菜单中的 "Existing Server (Advanced)" 就可以。你需要提供这个 VPS 的 IP 地址。

这个 VPS 必须使用 `$HOME/.ssh/id_rsa` 来储存 SSH key,并且可以使用 **root** 作为默认用户登录 VPS,如果提供商没有给你 root 用户作为默认用户登录,而是别的用户名,比如:`ubuntu` ,那么在运行 `./streisand` 之前需要额外配置 `ANSIBLE_SSH_USER` 环境变量,比如修改为:`ANSIBLE_SSH_USER=ubuntu` 。

Expand Down
6 changes: 3 additions & 3 deletions README-fr.md
Expand Up @@ -18,8 +18,8 @@ L'Internet peut être un peu injuste. Il est trop facile pour les fournisseurs d

Présentation de Streisand
-------------------------
* Une seule commande configure un tout nouveau serveur Ubuntu 16.04 exécutant une [grande variété de logiciels anti-censure](#services-provided) qui peuvent masquer et chiffrer totalement votre trafic Internet.
* Streisand supporte nativement la création de nouveaux serveurs chez [Amazon EC2](https://aws.amazon.com/ec2/), [Azure](https://azure.microsoft.com/fr-fr/), [DigitalOcean](https://www.digitalocean.com/), [Google Compute Engine](Https://cloud.google.com/compute/), [Linode](https://www.linode.com/) et [Rackspace](https://www.rackspace.com/)— et plus de fournisseurs à venir! Il fonctionne également sur n'importe quel serveur Ubuntu 16.04 quel que soit le fournisseur, et des **centaines** d'instances peuvent être configurés simultanément en utilisant cette méthode.
* Une seule commande configure un tout nouveau serveur Ubuntu 18.04 exécutant une [grande variété de logiciels anti-censure](#services-provided) qui peuvent masquer et chiffrer totalement votre trafic Internet.
* Streisand supporte nativement la création de nouveaux serveurs chez [Amazon EC2](https://aws.amazon.com/ec2/), [Azure](https://azure.microsoft.com/fr-fr/), [DigitalOcean](https://www.digitalocean.com/), [Google Compute Engine](Https://cloud.google.com/compute/), [Linode](https://www.linode.com/) et [Rackspace](https://www.rackspace.com/)— et plus de fournisseurs à venir! Il fonctionne également sur n'importe quel serveur Ubuntu 18.04 quel que soit le fournisseur, et des **centaines** d'instances peuvent être configurés simultanément en utilisant cette méthode.
* Le processus est entièrement automatisé et ne prend que quelques dizaines de minutes, ce qui est assez remarquable si vous considérez qu'il faudrait un administrateur système au moins plusieurs jours de contrainte pour mettre en place un petit sous-ensemble de ce que Streisand offre dans sa configuration.
* Une fois que votre serveur Streisand est en cours d'exécution, vous pouvez donner les instructions de connexion personnalisée à vos amis, membres de la famille et activistes. Les instructions de connexion contiennent une copie intégrée du certificat SSL unique du serveur, il vous suffit de leur envoyer un seul fichier.
* Chaque serveur est entièrement autonome et comprend tout ce dont les utilisateurs ont besoin pour démarrer, y compris les miroirs cryptographiquement vérifiés de tous les clients communs. Cela rend toute tentative de censure des emplacements de téléchargement par défaut complètement inefficace.
Expand Down Expand Up @@ -149,7 +149,7 @@ Si vous ne pouvez pas exécuter Streisand de la manière normale (à partir de v

### Exécution de Streisand sur d'autres fournisseurs (Avancé) ###

Vous pouvez également exécuter Streisand sur un nouveau serveur Ubuntu 16.04. Serveur dédié? Génial! Fournisseur de cloud ésotérique? Fantastique! Pour ce faire, choisissez simplement `Existing server (Advanced)` dans le menu après avoir exécuté `./streisand` et fournissez l'adresse IP du serveur existant lorsque vous y êtes invité.
Vous pouvez également exécuter Streisand sur un nouveau serveur Ubuntu 18.04. Serveur dédié? Génial! Fournisseur de cloud ésotérique? Fantastique! Pour ce faire, choisissez simplement `Existing server (Advanced)` dans le menu après avoir exécuté `./streisand` et fournissez l'adresse IP du serveur existant lorsque vous y êtes invité.

Le serveur doit être accessible en utilisant la clé SSH `$HOME/.ssh/id_rsa`, avec **root** comme utilisateur de connexion par défaut. Si votre fournisseur vous demande un utilisateur SSH au lieu de `root` (par exemple, `ubuntu`), spécifiez la variable environnementale `ANSIBLE_SSH_USER` (par exemple `ANSIBLE_SSH_USER=ubuntu`) lorsque vous exécutez `./streisand`.

Expand Down
6 changes: 3 additions & 3 deletions README-ru.md
Expand Up @@ -18,8 +18,8 @@

Представляем Стрейзанд
---------------------
* Одна-единственная команда настраивает с нуля сервер под операционной системой Ubuntu 16.04 с большим набором [ПО для противодействия цензуре](#services-provided), который может полностью скрыть и зашифровать весь ваш трафик.
* Стрейзанд поддерживает создание новых серверов в [Amazon EC2](https://aws.amazon.com/ec2/), [Azure](https://azure.microsoft.com), [DigitalOcean](https://www.digitalocean.com/), [Google Compute Engine](https://cloud.google.com/compute/), [Linode](https://www.linode.com/), и [Rackspace](https://www.rackspace.com/). В скором времени ожидается поддержка также и других облачных хостеров. Стрейзанд также можно запускать на любом сервере с операционной системой Ubuntu 16.04 вне зависимости от хостера, и **сотни** серверов могут быть одновременно сконфигурированы с применением этого метода.
* Одна-единственная команда настраивает с нуля сервер под операционной системой Ubuntu 18.04 с большим набором [ПО для противодействия цензуре](#services-provided), который может полностью скрыть и зашифровать весь ваш трафик.
* Стрейзанд поддерживает создание новых серверов в [Amazon EC2](https://aws.amazon.com/ec2/), [Azure](https://azure.microsoft.com), [DigitalOcean](https://www.digitalocean.com/), [Google Compute Engine](https://cloud.google.com/compute/), [Linode](https://www.linode.com/), и [Rackspace](https://www.rackspace.com/). В скором времени ожидается поддержка также и других облачных хостеров. Стрейзанд также можно запускать на любом сервере с операционной системой Ubuntu 18.04 вне зависимости от хостера, и **сотни** серверов могут быть одновременно сконфигурированы с применением этого метода.
* Процесс полностью автоматизирован и занимает примерно десять минут, что довольно круто, учитывая что среднему системному администратору требуется несколько дней возни, для того, чтобы настроить малую часть того, что Стрейзанд предлагает "из коробки".
* После того, как ваш сервер Стрейзанд запущен, вы можете раздать инструкции по подключению друзьям, членам семьи и соратникам. Инструкции по подключению содержат в себе копию SSL-сертификата, уникального для каждого сервера, так что вам нужно послать им всего один файл.
* Каждый сервер полностью самодостаточен и содержит абсолютно всё, что нужно для того, чтобы начать использовать Стрейзанд, включая криптографически верифицированные копии основного клиентского ПО. Это позволяет обойти попытки подвергнуть цензуре соответствующее ПО.
Expand Down Expand Up @@ -174,7 +174,7 @@

### Использование Стрейзанд для других хостеров (Для продвинутых) ###

Вы также можете запустить Стрейзанд на любом сервере Ubuntu 16.04. Выделенный сервер? Отлично! Странный облачный хостер? Замечательно! Чтобы это сделать, просто выберите
Вы также можете запустить Стрейзанд на любом сервере Ubuntu 18.04. Выделенный сервер? Отлично! Странный облачный хостер? Замечательно! Чтобы это сделать, просто выберите
"Existing Server (Advanced)" из меню после запуска `./streisand` и введите IP адрес существующего сервера , когда скрипт запросит эти данные.

Этот сервер должен разрешать подключение с SSH-ключом `$HOME/.ssh/id_rsa` и по умолчанию для подключения будет использоваться пользователь **root**. Если ваш хостер требует, чтобы для подключения использовался какой-то другой пользователь (например `ubuntu`), установите переменную среды `ANSIBLE_SSH_USER` (например `ANSIBLE_SSH_USER=ubuntu` ) перед запуском `./streisand`.
Expand Down
8 changes: 6 additions & 2 deletions Vagrantfile
@@ -1,10 +1,14 @@
# See documentation/testing.md for instructions on using this Vagrantfile
#
Vagrant.require_version ">= 1.9.0"
Vagrant.require_version ">= 2.0.0"

Vagrant.configure(2) do |config|

config.vm.box = "ubuntu/xenial64"
config.vm.box = "ubuntu/bionic64"

config.vm.provision "shell",
inline: "sudo apt install ifupdown"
#end

config.vm.define "streisand-host", primary: true do |streisand|
streisand.vm.hostname = "streisand-host"
Expand Down
17 changes: 14 additions & 3 deletions playbooks/roles/common/tasks/main.yml
@@ -1,8 +1,8 @@
---
- name: Warn users if the server's Linux distribution is not Ubuntu 16.04
- name: Warn users if the server's Linux distribution is not Ubuntu 18.04
pause:
prompt: "Ubuntu 16.04 is the only officially supported distribution; the setup will probably fail. Press Enter if you still want to continue."
when: not streisand_noninteractive and (ansible_distribution != "Ubuntu" or ansible_distribution_version != "16.04")
prompt: "Ubuntu 18.04 is the only officially supported distribution; the setup will probably fail. Press Enter if you still want to continue."
when: not streisand_noninteractive and (ansible_distribution != "Ubuntu" or ansible_distribution_version != "18.04")

# Set default variables
- import_tasks: set-default-variables.yml
Expand All @@ -27,6 +27,17 @@
apt:
upgrade: "safe"

- name: Generate the custom resolvd.conf file
template:
src: resolvd.conf.j2
dest: "/etc/systemd/resolved.conf"

- name: Restart systemd-resolve for settings to take effect
systemd:
name: "systemd-resolved.service"
daemon_reload: yes
state: restarted

- name: Copy the English BIP-0039 wordlist
copy:
src: english.txt
Expand Down
21 changes: 21 additions & 0 deletions playbooks/roles/common/templates/resolvd.conf.j2
@@ -0,0 +1,21 @@
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See resolved.conf(5) for details

[Resolve]
DNS={{ upstream_dns_servers | join(' ') }}
FallbackDNS=1.1.1.1 1.0.0.1
DNSOverTLS="opportunistic"
LLMNR=yes
DNSSEC=no
Cache=yes
DNSStubListener=yes
2 changes: 0 additions & 2 deletions playbooks/roles/common/vars/main.yml
Expand Up @@ -6,8 +6,6 @@ streisand_common_packages:
- apt-transport-https
# Used to perform a system upgrade
- aptitude
# Used to compile Libreswan and OpenConnect Server (ocserv)
- build-essential
# Used to perform API requests, including the version check for
# the Tor Browser Bundle
- curl
Expand Down
10 changes: 7 additions & 3 deletions playbooks/roles/dnsmasq/templates/dnsmasq.conf.j2
Expand Up @@ -18,6 +18,10 @@ bogus-priv
# uncomment this.
no-resolv

{% for item in upstream_dns_servers %}
server={{ item }}
{% endfor %}
bind-interfaces

server=127.0.0.53

#{% for item in upstream_dns_servers %}
#server={{ item }}
#{% endfor %}
9 changes: 4 additions & 5 deletions playbooks/roles/download-and-verify/tasks/main.yml
Expand Up @@ -55,15 +55,14 @@
- name: "Verify the {{ project_name }} download signatures were from the correct keys"
assert:
that:
# By default gpgv outputs to stderr. For a good signature the first line
# always ends being like:
# "gpgv: Signature made Fri 16 Mar 2018 11:16:40 PM UTC using RSA key ID
# C3C07136"
# By default gpgv outputs to stderr. For a good signature the second line
# will contain the key ID:
# "gpgv: using RSA key 2BC7E4E67E3CC0C1BEA72F8C2EFC7FF0D416E014"
# Since we've already verified the gpgv2 return code we can just check for
# the presence of the key ID we expect in the first line of stderr output
# and be confident we saw a valid signature from the expected key ID and
# not another unrelated key in the Streisand keyring.
- "'key ID {{ project_signer_keyid }}' in '{{ item.stderr_lines[0] }}'"
- "'{{ project_signer_keyid }}' in '{{ item.stderr_lines[1] }}'"
msg: "The GPG signature on {{ item.item.file }} was not from {{ project_signer_keyid }}"
with_items: "{{ gpg_verification_results.results }}"
loop_control:
Expand Down
2 changes: 1 addition & 1 deletion playbooks/roles/genesis-amazon/defaults/main.yml
Expand Up @@ -3,4 +3,4 @@ aws_instance_type: "t2.micro"
# Search AMIs owned by this owner. This is the Amazon owner ID.
aws_ami_owner: "099720109477"
# Find AMIs matching this name
aws_ami_name: "ubuntu/images/hvm-ssd/ubuntu-xenial-16.04-amd64-server-*"
aws_ami_name: "ubuntu/images/hvm-ssd/ubuntu-bionic-18.04-amd64-server-*"
2 changes: 1 addition & 1 deletion playbooks/roles/genesis-azure/defaults/main.yml
Expand Up @@ -3,5 +3,5 @@ azure_instance_type: "Standard_B1s"

azure_image_publisher: "Canonical"
azure_image_offer: "UbuntuServer"
azure_image_sku: "16.04-LTS"
azure_image_sku: "18.04-LTS"
azure_image_version: "latest"
2 changes: 1 addition & 1 deletion playbooks/roles/genesis-digitalocean/defaults/main.yml
@@ -1,3 +1,3 @@
---
do_ubuntu_x64_image_id: "ubuntu-16-04-x64"
do_ubuntu_x64_image_id: "ubuntu-18-04-x64"
do_small_droplet_size_id: "s-1vcpu-1gb"
2 changes: 1 addition & 1 deletion playbooks/roles/genesis-google/defaults/main.yml
@@ -1,3 +1,3 @@
---
gce_machine_type: "f1-micro"
gce_image: "ubuntu-1604"
gce_image: "ubuntu-1804"
2 changes: 1 addition & 1 deletion playbooks/roles/genesis-linode/defaults/main.yml
Expand Up @@ -2,7 +2,7 @@
# Setting to most minimal linode plan size.
# For a most recent list of types: curl https://api.linode.com/v4/linode/types
linode_plan_id: "g6-nanode-1"
linode_distribution_id: "linode/ubuntu16.04lts"
linode_distribution_id: "linode/ubuntu18.04lts"

### Preserving these varsfor when we can set these with the ansible linode apiv4 module:
# linode_kernel_id: 210 # GRUB2 to utilize the distribution's kernel for compatibility
Expand Down
2 changes: 1 addition & 1 deletion playbooks/roles/genesis-rackspace/defaults/main.yml
@@ -1,3 +1,3 @@
---
rackspace_flavor: 2
rackspace_image: "Ubuntu 16.04 LTS (Xenial Xerus) (PVHVM)"
rackspace_image: "Ubuntu 18.04 LTS (Bionic Beaver) (PVHVM)"
1 change: 1 addition & 0 deletions playbooks/roles/gpg/tasks/main.yml
Expand Up @@ -59,6 +59,7 @@
with_items:
- "S.dirmngr"
- "S.gpg-agent"
when: not streisand_ci

- name: "Create the Streisand GPG keyring"
command: "gpg2 {{ streisand_default_gpg_flags }} --fingerprint"
Expand Down
22 changes: 11 additions & 11 deletions playbooks/roles/openconnect/tasks/firewall.yml
Expand Up @@ -12,15 +12,15 @@
proto: "any"
rule: "allow"

- name: Install the ocserv iptables service file
template:
src: ocserv-iptables.service.j2
dest: /etc/systemd/system/ocserv-iptables.service
mode: 0644
#- name: Install the ocserv iptables service file
# template:
# src: ocserv-iptables.service.j2
# dest: /etc/systemd/system/ocserv-iptables.service
# mode: 0644

- name: Enable the ocserv-iptables service
systemd:
daemon_reload: yes
name: ocserv-iptables.service
enabled: yes
state: started
#- name: Enable the ocserv-iptables service
# systemd:
# daemon_reload: yes
# name: ocserv-iptables.service
# enabled: yes
# state: started
22 changes: 11 additions & 11 deletions playbooks/roles/openvpn/tasks/firewall.yml
Expand Up @@ -29,15 +29,15 @@
proto: "udp"
rule: "allow"

- name: Install the OpenVPN iptables service file
template:
src: openvpn-iptables.service.j2
dest: /etc/systemd/system/openvpn-iptables.service
mode: 0644
#- name: Install the OpenVPN iptables service file
# template:
# src: openvpn-iptables.service.j2
# dest: /etc/systemd/system/openvpn-iptables.service
# mode: 0644

- name: Enable the openvpn-iptables service
systemd:
daemon_reload: yes
name: openvpn-iptables.service
enabled: yes
state: started
#- name: Enable the openvpn-iptables service
# systemd:
# daemon_reload: yes
# name: openvpn-iptables.service
# enabled: yes
# state: started