2017/08/09 MacOS
$ ls -al ~/.ssh
#### Set up Docker Daemon | |
#### Check if this script is ran with admin rights | |
# if no - exit with message | |
function Test-Elevation { | |
$role = [Security.Principal.WindowsBuiltInRole]::Administrator | |
$principal = [Security.Principal.WindowsPrincipal]` | |
[Security.Principal.WindowsIdentity]::GetCurrent() | |
$principal.IsInRole($role) | |
} |
ask_password: | |
@$(eval PASSWORD=$(shell stty -echo; read -p "Password: " pwd; stty echo; echo $$pwd)) | |
echo $(PASSWORD) | |
ask_password_twice: | |
while true; do \ | |
read -s -p "Password: " password; \ | |
echo; \ | |
read -s -p "Password (again): " password2; \ |
# I found at https://dreisbach.us/articles/simple-ansible-makefile/ | |
# Replace this | |
# ansible-playbook -i hosts --vault-password-file=.vault-password.txt site.yml | |
# For this | |
tags = $(subst roles/,,$(wildcard roles/*)) | |
.PHONY: all $(tags) | |
all: | |
ansible-playbook -i hosts --vault-password-file=.vault-password.txt site.yml | |
$(tags): |
#based on http://www.forshee.me/2016/03/02/ubiquiti-edgerouter-lite-setup-part-2-firewall-setup.html | |
configure | |
edit firewall name allow-est-drop-inv | |
set default-action drop | |
set enable-default-log | |
set rule 1 action accept | |
set rule 1 state established enable | |
set rule 1 state related enable | |
set rule 2 action drop |
# export private keys | |
gpg --export-secret-keys --armor > gpg-private.keys | |
# import private keys | |
gpg --import gpg-private.keys | |
# export public keys | |
gpg --export --armor > gpg-public.keys | |
# import public keys |
# Controlling my Buva Qstream ventilation system using: | |
# * A Wemos D1 mini lite (an ESP8266 based board) | |
# * A Wemos power shield so I can power the Wemos from the ventilation units 12V supply. | |
# * A simple PWM to 10V convertor like this: https://www.cheaptech.nl/pwm-signaal-te-voltage-converter-1-3-khz-0-10-v-pw.html | |
# * The amazing ESPHome firmware tool: https://esphome.io | |
# * Home Assistant to tie it all together: https://www.home-assistant.io | |
# | |
# I used to use a Raspberry Pi and some Python code for this. See https://gist.github.com/SqyD/a927ab612df767a0cc892bcde23d025c | |
# The Wemos approach seems more stable and doesn't require external USB power. |
The purpouse is to have a WireGuard server running with a configuration for 2 clients to connect to the WireGuard server.
Follow the instructions for downloading and installing the WireGuard package here: https://github.com/WireGuard/wireguard-vyatta-ubnt
curl -OL https://github.com/WireGuard/wireguard-vyatta-ubnt/releases/download/${RELEASE}/${BOARD}-${RELEASE}.deb
sudo dpkg -i ${BOARD}-${RELEASE}.deb
First we need to create the VLAN on the Synology from the command line: | |
See: https://nielshagoort.com/2016/03/30/synology-vlan-tagging/ | |
Then add Network to Docker using maclvan driver | |
See: https://docs.docker.com/engine/userguide/networking/get-started-macvlan/#macvlan-8021q-trunk-bridge-mode-example-usage | |
Details... |