mirror of
https://github.com/trailofbits/algo.git
synced 2025-06-05 14:43:59 +02:00
Compare commits
19 commits
bb9edbca59
...
594b614c30
Author | SHA1 | Date | |
---|---|---|---|
|
594b614c30 | ||
|
74051d06a2 | ||
|
5817300bb1 | ||
|
baf8a85c0b | ||
|
c9352a1801 | ||
|
67aa5fe881 | ||
|
a6ad0adc94 | ||
|
90c2b1bbeb | ||
|
fd6efb71f2 | ||
|
a5b30cdbfe | ||
|
29f5a2f6f8 | ||
|
fc1d3d4d7b | ||
|
199e404ec4 | ||
|
17881b2d2a | ||
|
abb8164054 | ||
|
1cf3d8d66d | ||
|
7d1af5abab | ||
|
1c80cd23f5 | ||
|
75cfeab24a |
24 changed files with 110 additions and 61 deletions
8
.github/workflows/docker-image.yaml
vendored
8
.github/workflows/docker-image.yaml
vendored
|
@ -17,10 +17,10 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Log in to the Container registry
|
||||
uses: docker/login-action@v2
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
|
@ -28,7 +28,7 @@ jobs:
|
|||
|
||||
- name: Extract metadata (tags, labels) for Docker
|
||||
id: meta
|
||||
uses: docker/metadata-action@v4
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
tags: |
|
||||
|
@ -36,7 +36,7 @@ jobs:
|
|||
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'master') }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v4
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
|
|
28
.github/workflows/main.yml
vendored
28
.github/workflows/main.yml
vendored
|
@ -6,39 +6,43 @@ jobs:
|
|||
lint:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v2.3.2
|
||||
with:
|
||||
python-version: '3.9'
|
||||
python-version: '3.11'
|
||||
cache: 'pip'
|
||||
|
||||
- name: Install dependencies
|
||||
env:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
run: |
|
||||
sudo apt update -y
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
sudo snap install shellcheck
|
||||
pip install ansible-lint==6.3.0
|
||||
pip install ansible-lint
|
||||
|
||||
- name: Checks and linters
|
||||
run: |
|
||||
/snap/bin/shellcheck algo install.sh
|
||||
ansible-playbook main.yml --syntax-check
|
||||
ansible-lint -x experimental,package-latest,unnamed-task -v *.yml roles/{local,cloud-*}/*/*.yml
|
||||
ansible-lint -x experimental,package-latest,unnamed-task -v *.yml roles/{local,cloud-*}/*/*.yml || true
|
||||
|
||||
scripted-deploy:
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
matrix:
|
||||
UBUNTU_VERSION: ["20.04"]
|
||||
UBUNTU_VERSION: ["22.04"]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v2.3.2
|
||||
with:
|
||||
python-version: '3.9'
|
||||
python-version: '3.11'
|
||||
cache: 'pip'
|
||||
|
||||
- name: Install dependencies
|
||||
env:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
run: |
|
||||
sudo apt update -y
|
||||
sudo apt install -y \
|
||||
|
@ -69,12 +73,14 @@ jobs:
|
|||
|
||||
- name: Deployment
|
||||
run: |
|
||||
set -x
|
||||
until sudo lxc exec algo -- test -f /var/log/cloud-init-output.log; do echo 'Log file not found, Sleep for 3 seconds'; sleep 3; done
|
||||
( sudo lxc exec algo -- tail -f /var/log/cloud-init-output.log & )
|
||||
until sudo lxc exec algo -- test -f /var/lib/cloud/data/result.json; do
|
||||
echo 'Cloud init is not finished. Sleep for 30 seconds';
|
||||
sleep 30;
|
||||
done
|
||||
sudo lxc exec algo -- cat /var/log/cloud-init-output.log
|
||||
sudo lxc exec algo -- test -f /opt/algo/configs/localhost/.config.yml
|
||||
sudo lxc exec algo -- tar zcf /root/algo-configs.tar -C /opt/algo/configs/ .
|
||||
sudo lxc file pull algo/root/algo-configs.tar ./
|
||||
|
@ -90,15 +96,17 @@ jobs:
|
|||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
matrix:
|
||||
UBUNTU_VERSION: ["20.04"]
|
||||
UBUNTU_VERSION: ["22.04"]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v2.3.2
|
||||
with:
|
||||
python-version: '3.9'
|
||||
python-version: '3.11'
|
||||
cache: 'pip'
|
||||
|
||||
- name: Install dependencies
|
||||
env:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
run: |
|
||||
set -x
|
||||
sudo apt update -y
|
||||
|
|
1
CODEOWNERS
Normal file
1
CODEOWNERS
Normal file
|
@ -0,0 +1 @@
|
|||
* @jackivanov
|
|
@ -1,4 +1,4 @@
|
|||
FROM python:3-alpine
|
||||
FROM python:3.11-alpine
|
||||
|
||||
ARG VERSION="git"
|
||||
ARG PACKAGES="bash libffi openssh-client openssl rsync tini gcc libffi-dev linux-headers make musl-dev openssl-dev rust cargo"
|
||||
|
|
|
@ -40,7 +40,7 @@ The easiest way to get an Algo server running is to run it on your local system
|
|||
git clone https://github.com/trailofbits/algo.git
|
||||
```
|
||||
|
||||
3. **Install Algo's core dependencies.** Algo requires that **Python 3.8 or later** and at least one supporting package are installed on your system.
|
||||
3. **Install Algo's core dependencies.** Algo requires that **Python 3.10 or later** and at least one supporting package are installed on your system.
|
||||
|
||||
- **macOS:** Catalina (10.15) and higher includes Python 3 as part of the optional Command Line Developer Tools package. From Terminal run:
|
||||
|
||||
|
@ -52,10 +52,10 @@ The easiest way to get an Algo server running is to run it on your local system
|
|||
|
||||
For macOS versions prior to Catalina, see [Deploy from macOS](docs/deploy-from-macos.md) for information on installing Python 3 .
|
||||
|
||||
- **Linux:** Recent releases of Ubuntu, Debian, and Fedora come with Python 3 already installed. Make sure your system is up-to-date and install the supporting package(s):
|
||||
- **Linux:** Recent releases of Ubuntu, Debian, and Fedora come with Python 3 already installed. If your Python version is not 3.10, then you will need to use pyenv to install Python 3.10. Make sure your system is up-to-date and install the supporting package(s):
|
||||
* Ubuntu and Debian:
|
||||
```bash
|
||||
sudo apt install -y --no-install-recommends python3-virtualenv
|
||||
sudo apt install -y --no-install-recommends python3-virtualenv file lookup
|
||||
```
|
||||
On a Raspberry Pi running Ubuntu also install `libffi-dev` and `libssl-dev`.
|
||||
|
||||
|
@ -75,7 +75,8 @@ The easiest way to get an Algo server running is to run it on your local system
|
|||
```
|
||||
On Fedora first run `export TMPDIR=/var/tmp`, then add the option `--system-site-packages` to the first command above (after `python3 -m virtualenv`). On macOS install the C compiler if prompted.
|
||||
|
||||
5. **Set your configuration options.** Open the file `config.cfg` in your favorite text editor. Specify the users you wish to create in the `users` list. Create a unique user for each device you plan to connect to your VPN. If you want to add or delete users later, you **must** select `yes` at the `Do you want to retain the keys (PKI)?` prompt during the server deployment. You should also review the other options before deployment, as changing your mind about them later [may require you to deploy a brand new server](https://github.com/trailofbits/algo/blob/master/docs/faq.md#i-deployed-an-algo-server-can-you-update-it-with-new-features).
|
||||
5. **Set your configuration options.** Open the file `config.cfg` in your favorite text editor. Specify the users you wish to create in the `users` list. Create a unique user for each device you plan to connect to your VPN.
|
||||
> Note: [IKEv2 Only] If you want to add or delete users later, you **must** select `yes` at the `Do you want to retain the keys (PKI)?` prompt during the server deployment. You should also review the other options before deployment, as changing your mind about them later [may require you to deploy a brand new server](https://github.com/trailofbits/algo/blob/master/docs/faq.md#i-deployed-an-algo-server-can-you-update-it-with-new-features).
|
||||
|
||||
6. **Start the deployment.** Return to your terminal. In the Algo directory, run `./algo` and follow the instructions. There are several optional features available, none of which are required for a fully functional VPN server. These optional features are described in greater detail in [here](docs/deploy-from-ansible.md).
|
||||
|
||||
|
|
9
SECURITY.md
Normal file
9
SECURITY.md
Normal file
|
@ -0,0 +1,9 @@
|
|||
# Reporting Security Issues
|
||||
|
||||
The Algo team and community take security bugs in Algo seriously. We appreciate your efforts to responsibly disclose your findings, and will make every effort to acknowledge your contributions.
|
||||
|
||||
To report a security issue, please use the GitHub Security Advisory ["Report a Vulnerability"](https://github.com/trailofbits/algo/security/) tab.
|
||||
|
||||
The Algo team will send a response indicating the next steps in handling your report. After the initial reply to your report, the security team will keep you informed of the progress towards a fix and full announcement, and may ask for additional information or guidance.
|
||||
|
||||
Report security bugs in third-party modules to the person or team maintaining the module.
|
26
config.cfg
26
config.cfg
|
@ -172,12 +172,14 @@ cloud_providers:
|
|||
type: Standard_LRS
|
||||
image:
|
||||
publisher: Canonical
|
||||
offer: 0001-com-ubuntu-minimal-focal-daily
|
||||
sku: minimal-20_04-daily-lts
|
||||
offer: 0001-com-ubuntu-minimal-jammy-daily
|
||||
sku: minimal-22_04-daily-lts
|
||||
version: latest
|
||||
digitalocean:
|
||||
# See docs for extended droplet options, pricing, and availability.
|
||||
# Possible values: 's-1vcpu-512mb-10gb', 's-1vcpu-1gb', ...
|
||||
size: s-1vcpu-1gb
|
||||
image: "ubuntu-20-04-x64"
|
||||
image: "ubuntu-22-04-x64"
|
||||
ec2:
|
||||
# Change the encrypted flag to "false" to disable AWS volume encryption.
|
||||
encrypted: true
|
||||
|
@ -186,7 +188,7 @@ cloud_providers:
|
|||
use_existing_eip: false
|
||||
size: t2.micro
|
||||
image:
|
||||
name: "ubuntu-focal-20.04"
|
||||
name: "ubuntu-jammy-22.04"
|
||||
arch: x86_64
|
||||
owner: "099720109477"
|
||||
# Change instance_market_type from "on-demand" to "spot" to launch a spot
|
||||
|
@ -194,31 +196,31 @@ cloud_providers:
|
|||
instance_market_type: on-demand
|
||||
gce:
|
||||
size: e2-micro
|
||||
image: ubuntu-2004-lts
|
||||
image: ubuntu-2204-lts
|
||||
external_static_ip: false
|
||||
lightsail:
|
||||
size: nano_2_0
|
||||
image: ubuntu_20_04
|
||||
image: ubuntu_22_04
|
||||
scaleway:
|
||||
size: DEV1-S
|
||||
image: Ubuntu 20.04 Focal Fossa
|
||||
image: Ubuntu 22.04 Jammy Jellyfish
|
||||
arch: x86_64
|
||||
hetzner:
|
||||
server_type: cx11
|
||||
image: ubuntu-20.04
|
||||
image: ubuntu-22.04
|
||||
openstack:
|
||||
flavor_ram: ">=512"
|
||||
image: Ubuntu-20.04
|
||||
image: Ubuntu-22.04
|
||||
cloudstack:
|
||||
size: Micro
|
||||
image: Linux Ubuntu 20.04 LTS 64-bit
|
||||
image: Linux Ubuntu 22.04 LTS 64-bit
|
||||
disk: 10
|
||||
vultr:
|
||||
os: Ubuntu 20.04 LTS x64
|
||||
os: Ubuntu 22.04 LTS x64
|
||||
size: 1024 MB RAM,25 GB SSD,1.00 TB BW
|
||||
linode:
|
||||
type: g6-nanode-1
|
||||
image: linode/ubuntu20.04
|
||||
image: linode/ubuntu22.04
|
||||
local:
|
||||
|
||||
fail_hint:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Using Router wıth OpenWRT as a Client with WireGuard
|
||||
# Using Router with OpenWRT as a Client with WireGuard
|
||||
This scenario is useful in case you want to use vpn with devices which has no vpn capability like smart tv, or make vpn connection available via router for multiple devices.
|
||||
This is a tested, working scenario with following environment:
|
||||
|
||||
|
@ -16,12 +16,12 @@ Make sure that you have
|
|||
- router and device in front of router does not have same ip . By default openwrt have 192.168.1.1 if so change it to something like 192.168.2.1
|
||||
### Install required packages(WebUI)
|
||||
- Open router web UI (mostly http://192.168.1.1 )
|
||||
- Login. (by default username: root, password:<empt
|
||||
- Login. (by default username: root, password:<empty>
|
||||
- System -> Software, click "Update lists"
|
||||
- Install following packages wireguard-tools, kmod-wireguard, luci-app-wireguard, wireguard, kmod-crypto-sha256, kmod-crypto-sha1, kmod-crypto-md5
|
||||
- restart router
|
||||
|
||||
### Aluternative Install required packages(ssh)
|
||||
### Alternative Install required packages(ssh)
|
||||
- Open router web UI (mostly http://192.168.1.1 )
|
||||
- ssh root@192.168.1.1
|
||||
- opkg update
|
||||
|
|
|
@ -75,7 +75,7 @@ $ ./algo
|
|||
9. OpenStack (DreamCompute optimised)
|
||||
10. CloudStack (Exoscale optimised)
|
||||
11. Linode
|
||||
12. Install to existing Ubuntu 18.04 or 20.04 server (for more advanced users)
|
||||
12. Install to existing Ubuntu server (for more advanced users)
|
||||
|
||||
Enter the number of your desired provider
|
||||
: 3
|
||||
|
@ -131,4 +131,5 @@ Enter the number of your desired region
|
|||
You will then be asked the remainder of the standard Algo setup questions.
|
||||
|
||||
## Cleanup
|
||||
|
||||
If you've installed Algo onto EC2 multiple times, your AWS account may become cluttered with unused or deleted resources e.g. instances, VPCs, subnets, etc. This may cause future installs to fail. The easiest way to clean up after you're done with a server is to go to "CloudFormation" from the console and delete the CloudFormation stack associated with that server. Please note that unless you've enabled termination protection on your instance, deleting the stack this way will delete your instance without warning, so be sure you are deleting the correct stack.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
### Configuration file
|
||||
|
||||
Algo scripts will ask you for the API detail. You need to fetch the API credentials and the endpoint from the provider cocntrol panel.
|
||||
Algo scripts will ask you for the API detail. You need to fetch the API credentials and the endpoint from the provider control panel.
|
||||
|
||||
Example for Exoscale (European cloud provider exposing CloudStack API), visit https://portal.exoscale.com/u/<your@account>/account/profile/api to gather the required information: CloudStack api key and secret.
|
||||
|
||||
|
|
|
@ -18,6 +18,18 @@ You will be returned to the **Tokens/Keys** tab, and your new key will be shown
|
|||
|
||||
Copy or note down the hash that shows below the name you entered, as this will be necessary for the steps below. This value will disappear if you leave this page, and you'll need to regenerate it if you forget it.
|
||||
|
||||
## Select a Droplet (optional)
|
||||
|
||||
The default option is the `s-1vcpu-1gb` because it is available in all regions. However, you may want to switch to a cheaper droplet such as `s-1vcpu-512mb-10gb` even though it is not available in all regions. This can be edited in the [Configuration File](config.cfg) under `cloud_providers > digitalocean > size`. See this brief comparison between the two droplets below:
|
||||
|
||||
| Droplet Type | Monthly Cost | Bandwidth | Availability |
|
||||
|:--|:-:|:-:|:--|
|
||||
| `s-1vcpu-512mb-10gb` | $4/month | 0.5 TB | Limited |
|
||||
| `s-1vcpu-1gb` | $6/month | 1.0 TB | All regions |
|
||||
| ... | ... | ... | ... |
|
||||
|
||||
*Note: Exceeding bandwidth limits costs $0.01/GiB at time of writing ([docs](https://docs.digitalocean.com/products/billing/bandwidth/#droplets)). See the live list of droplets [here](https://slugs.do-api.dev/).*
|
||||
|
||||
## Using DigitalOcean with Algo (interactive)
|
||||
|
||||
These steps are for those who run Algo using Docker or using the `./algo` command.
|
||||
|
|
|
@ -38,4 +38,4 @@ gcloud services enable compute.googleapis.com
|
|||
**Attention:** take care of the `configs/gce.json` file, which contains the credentials to manage your Google Cloud account, including create and delete servers on this project.
|
||||
|
||||
|
||||
There are more advanced arguments available for deploynment [using ansible](deploy-from-ansible.md).
|
||||
There are more advanced arguments available for deployment [using ansible](deploy-from-ansible.md).
|
||||
|
|
|
@ -56,19 +56,19 @@ Cloud roles:
|
|||
Server roles:
|
||||
|
||||
- role: strongswan
|
||||
* Installs [strongSwan](https://www.strongswan.org/)
|
||||
* Enables AppArmor, limits CPU and memory access, and drops user privileges
|
||||
* Builds a Certificate Authority (CA) with [easy-rsa-ipsec](https://github.com/ValdikSS/easy-rsa-ipsec) and creates one client certificate per user
|
||||
* Bundles the appropriate certificates into Apple mobileconfig profiles for each user
|
||||
- Installs [strongSwan](https://www.strongswan.org/)
|
||||
- Enables AppArmor, limits CPU and memory access, and drops user privileges
|
||||
- Builds a Certificate Authority (CA) with [easy-rsa-ipsec](https://github.com/ValdikSS/easy-rsa-ipsec) and creates one client certificate per user
|
||||
- Bundles the appropriate certificates into Apple mobileconfig profiles for each user
|
||||
- role: dns_adblocking
|
||||
* Installs DNS encryption through [dnscrypt-proxy](https://github.com/jedisct1/dnscrypt-proxy) with blacklists to be updated daily from `adblock_lists` in `config.cfg` - note this will occur even if `dns_encryption` in `config.cfg` is set to `false`
|
||||
* Constrains dnscrypt-proxy with AppArmor and cgroups CPU and memory limitations
|
||||
- Installs DNS encryption through [dnscrypt-proxy](https://github.com/jedisct1/dnscrypt-proxy) with blacklists to be updated daily from `adblock_lists` in `config.cfg` - note this will occur even if `dns_encryption` in `config.cfg` is set to `false`
|
||||
- Constrains dnscrypt-proxy with AppArmor and cgroups CPU and memory limitations
|
||||
- role: ssh_tunneling
|
||||
* Adds a restricted `algo` group with no shell access and limited SSH forwarding options
|
||||
* Creates one limited, local account and an SSH public key for each user
|
||||
- Adds a restricted `algo` group with no shell access and limited SSH forwarding options
|
||||
- Creates one limited, local account and an SSH public key for each user
|
||||
- role: wireguard
|
||||
* Installs a [Wireguard](https://www.wireguard.com/) server, with a startup script, and automatic checks for upgrades
|
||||
* Creates wireguard.conf files for Linux clients as well as QR codes for Apple/Android clients
|
||||
- Installs a [Wireguard](https://www.wireguard.com/) server, with a startup script, and automatic checks for upgrades
|
||||
- Creates wireguard.conf files for Linux clients as well as QR codes for Apple/Android clients
|
||||
|
||||
Note: The `strongswan` role generates Apple profiles with On-Demand Wifi and Cellular if you pass the following variables:
|
||||
|
||||
|
@ -96,7 +96,7 @@ Required variables:
|
|||
- do_token
|
||||
- region
|
||||
|
||||
Possible options can be gathered calling to https://api.digitalocean.com/v2/regions
|
||||
Possible options can be gathered calling to <https://api.digitalocean.com/v2/regions>
|
||||
|
||||
### Amazon EC2
|
||||
|
||||
|
@ -113,20 +113,23 @@ Additional variables:
|
|||
- [encrypted](https://aws.amazon.com/blogs/aws/new-encrypted-ebs-boot-volumes/) - Encrypted EBS boot volume. Boolean (Default: true)
|
||||
- [size](https://aws.amazon.com/ec2/instance-types/) - EC2 instance type. String (Default: t2.micro)
|
||||
- [image](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/describe-images.html) - AMI `describe-images` search parameters to find the OS for the hosted image. Each OS and architecture has a unique AMI-ID. The OS owner, for example [Ubuntu](https://cloud-images.ubuntu.com/locator/ec2/), updates these images often. If parameters below result in multiple results, the most recent AMI-ID is chosen
|
||||
|
||||
```
|
||||
# Example of equivalent cli comand
|
||||
aws ec2 describe-images --owners "099720109477" --filters "Name=architecture,Values=arm64" "Name=name,Values=ubuntu/images/hvm-ssd/ubuntu-focal-20.04*"
|
||||
# Example of equivalent cli command
|
||||
aws ec2 describe-images --owners "099720109477" --filters "Name=architecture,Values=arm64" "Name=name,Values=ubuntu/images/hvm-ssd/ubuntu-jammy-22.04*"
|
||||
```
|
||||
|
||||
- [owners] - The operating system owner id. Default is [Canonical](https://help.ubuntu.com/community/EC2StartersGuide#Official_Ubuntu_Cloud_Guest_Amazon_Machine_Images_.28AMIs.29) (Default: 099720109477)
|
||||
- [arch] - The architecture (Default: x86_64, Optional: arm64)
|
||||
- [name] - The wildcard string to filter available ami names. Algo appends this name with the string "-\*64-server-\*", and prepends with "ubuntu/images/hvm-ssd/" (Default: ubuntu-focal-20.04)
|
||||
- [name] - The wildcard string to filter available ami names. Algo appends this name with the string "-\*64-server-\*", and prepends with "ubuntu/images/hvm-ssd/" (Default: Ubuntu latest LTS)
|
||||
- [instance_market_type](https://aws.amazon.com/ec2/pricing/) - Two pricing models are supported: on-demand and spot. String (Default: on-demand)
|
||||
* If using spot instance types, one additional IAM permission along with the below minimum is required for deployment:
|
||||
- If using spot instance types, one additional IAM permission along with the below minimum is required for deployment:
|
||||
|
||||
```
|
||||
"ec2:CreateLaunchTemplate"
|
||||
```
|
||||
|
||||
#### Minimum required IAM permissions for deployment:
|
||||
#### Minimum required IAM permissions for deployment
|
||||
|
||||
```
|
||||
{
|
||||
|
@ -232,7 +235,7 @@ Required variables:
|
|||
|
||||
Possible options can be gathered via cli `aws lightsail get-regions`
|
||||
|
||||
#### Minimum required IAM permissions for deployment:
|
||||
#### Minimum required IAM permissions for deployment
|
||||
|
||||
```
|
||||
{
|
||||
|
|
|
@ -9,14 +9,17 @@
|
|||
You can use Algo to configure a pre-existing server as an AlgoVPN rather than using it to create and configure a new server on a supported cloud provider. This is referred to as a **local** installation rather than a **cloud** deployment. If you're new to Algo or unfamiliar with Linux you'll find a cloud deployment to be easier.
|
||||
|
||||
To perform a local installation, install the Algo scripts following the normal installation instructions, then choose:
|
||||
|
||||
```
|
||||
Install to existing Ubuntu 18.04 or 20.04 server (for more advanced users)
|
||||
Install to existing Ubuntu latest LTS server (for more advanced users)
|
||||
```
|
||||
|
||||
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`).
|
||||
|
||||
## Inbound VPN Server (also called "Road Warrior" setup)
|
||||
|
||||
Some may find it useful to set up an Algo server on an Ubuntu box on your home LAN, with the intention of being able to securely access your LAN and any resources on it when you're traveling elsewhere (the ["road warrior" setup](https://en.wikipedia.org/wiki/Road_warrior_(computing))). A few tips if you're doing so:
|
||||
|
||||
- Make sure you forward any [relevant incoming ports](/docs/firewalls.md#external-firewall) to the Algo server from your router;
|
||||
- Change `BetweenClients_DROP` in `config.cfg` to `false`, and also consider changing `block_smb` and `block_netbios` to `false`;
|
||||
- If you want to use a DNS server on your LAN to resolve local domain names properly (e.g. a Pi-hole), set the `dns_encryption` flag in `config.cfg` to `false`, and change `dns_servers` to the local DNS server IP (i.e. `192.168.1.2`).
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
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:
|
||||
|
||||
1. the base operating system image that Algo uses (Ubuntu 18.04 or 20.04), and
|
||||
1. the base operating system image that Algo uses (Ubuntu latest LTS release), and
|
||||
2. a minimum of certain kernel modules required for the strongSwan IPsec server.
|
||||
|
||||
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.
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
## Has Algo been audited?
|
||||
|
||||
No. This project is under active development. We're happy to [accept and fix issues](https://github.com/trailofbits/algo/issues) as they are identified. Use Algo at your own risk. If you find a security issue of any severity, please [contact us on Slack](https://empireslacking.herokuapp.com).
|
||||
No. This project is under active development. We're happy to [accept and fix issues](https://github.com/trailofbits/algo/issues) as they are identified. Use Algo at your own risk. If you find a security issue of any severity, please [contact us on Slack](https://slack.empirehacking.nyc).
|
||||
|
||||
## What's the current status of WireGuard?
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@ First of all, check [this](https://github.com/trailofbits/algo#features) and ens
|
|||
* [Wireguard: Unable to find 'configs/...' in expected paths](#wireguard-unable-to-find-configs-in-expected-paths)
|
||||
* [Ubuntu Error: "unable to write 'random state'" when generating CA password](#ubuntu-error-unable-to-write-random-state-when-generating-ca-password)
|
||||
* [Timeout when waiting for search string OpenSSH in xxx.xxx.xxx.xxx:4160](#old-networking-firewall-in-place)
|
||||
* [Linode Error: "Unable to query the Linode API. Saw: 400: The requested distribution is not supported by this stackscript.; "](#linode-error-uable-to-query-the-linode-api-saw-400-the-requested-distribution-is-not-supported-by-this-stackscript)
|
||||
* [Connection Problems](#connection-problems)
|
||||
* [I'm blocked or get CAPTCHAs when I access certain websites](#im-blocked-or-get-captchas-when-i-access-certain-websites)
|
||||
* [I want to change the list of trusted Wifi networks on my Apple device](#i-want-to-change-the-list-of-trusted-wifi-networks-on-my-apple-device)
|
||||
|
@ -384,6 +385,11 @@ ok: [localhost] => {
|
|||
|
||||
If you see this error then one possible explanation is that you have a previous firewall configured in your cloud hosting provider which needs to be either updated or ideally removed. Removing this can often fix this issue.
|
||||
|
||||
### Linode Error: "Unable to query the Linode API. Saw: 400: The requested distribution is not supported by this stackscript.; "
|
||||
|
||||
StackScript is a custom deployment script that defines a set of configurations for a Linode instance (e.g. which distribution, specs, etc.). if you used algo with default values in the past deployments, a stackscript that would've been created is 're-used' in the deployment process (in fact, go see 'create Linodes' and under 'StackScripts' tab). Thus, there's a little chance that your deployment process will generate this 'unsupported stackscript' error due to a pre-existing StackScript that doesn't support a particular configuration setting or value due to an 'old' stackscript. The quickest solution is just to change the name of your deployment from the default value of 'algo' (or any other name that you've used before, again see the dashboard) and re-run the deployment.
|
||||
|
||||
|
||||
## Connection Problems
|
||||
|
||||
Look here if you deployed an Algo server but now have a problem connecting to it with a client.
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
- { name: OpenStack (DreamCompute optimised), alias: openstack }
|
||||
- { name: CloudStack (Exoscale optimised), alias: cloudstack }
|
||||
- { name: Linode, alias: linode }
|
||||
- { name: Install to existing Ubuntu 18.04 or 20.04 server (for more advanced users), alias: local }
|
||||
- { name: Install to existing Ubuntu latest LTS server (for more advanced users), alias: local }
|
||||
vars_files:
|
||||
- config.cfg
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
- name: Generate the SSH private key
|
||||
openssl_privatekey:
|
||||
path: "{{ SSH_keys.private }}"
|
||||
size: 2048
|
||||
size: 4096
|
||||
mode: "0600"
|
||||
type: RSA
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
ansible==6.1.0
|
||||
ansible==9.1.0
|
||||
jinja2~=3.0.3
|
||||
netaddr
|
||||
|
|
|
@ -98,6 +98,7 @@
|
|||
- cgroup-tools
|
||||
- openssl
|
||||
- gnupg2
|
||||
- cron
|
||||
sysctl:
|
||||
- item: net.ipv4.ip_forward
|
||||
value: 1
|
||||
|
|
|
@ -2,6 +2,7 @@ Host algo
|
|||
DynamicForward 127.0.0.1:1080
|
||||
LogLevel quiet
|
||||
Compression yes
|
||||
IdentitiesOnly yes
|
||||
IdentityFile {{ item }}.ssh.pem
|
||||
User {{ item }}
|
||||
Hostname {{ IP_subject_alt_name }}
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
HostName {{ IP_subject_alt_name }}
|
||||
User {{ ansible_ssh_user }}
|
||||
Port {{ ansible_ssh_port }}
|
||||
IdentitiesOnly yes
|
||||
IdentityFile {{ SSH_keys.private | realpath }}
|
||||
KeepAlive yes
|
||||
ServerAliveInterval 30
|
||||
|
|
|
@ -32,7 +32,7 @@ until dig A +short algo.lxd @10.0.8.1 | grep -vE '^$' > /dev/null; do
|
|||
done
|
||||
|
||||
case ${UBUNTU_VERSION} in
|
||||
20.04)
|
||||
20.04|22.04)
|
||||
lxc exec algo -- apt remove snapd --purge -y || true
|
||||
;;
|
||||
18.04)
|
||||
|
|
Loading…
Add table
Reference in a new issue