Merge branch '21-nic' into 'master'
Resolve "Error when fetching wireguard config after Post-Install" Closes #21 See merge request cyber5k/mistborn!16
This commit is contained in:
@@ -160,6 +160,15 @@ Mistborn uses the following domains (that can be reached by all Wireguard client
|
|||||||
| OnlyOffice | onlyoffice.mistborn | Off |
|
| OnlyOffice | onlyoffice.mistborn | Off |
|
||||||
| Jitsi | jitsi.mistborn | Off |
|
| Jitsi | jitsi.mistborn | Off |
|
||||||
|
|
||||||
|
# Default Credentials
|
||||||
|
These are the default credentials to use in the services you choose to use:
|
||||||
|
|
||||||
|
| Service | Username | Password |
|
||||||
|
| ------- | -------- | -------- |
|
||||||
|
| Pihole | | {{default mistborn password}} |
|
||||||
|
| Cockpit | cockpit | {{default mistborn password}} |
|
||||||
|
| Nextcloud | mistborn | {{default mistborn password}} |
|
||||||
|
|
||||||
# Gateway Setup
|
# Gateway Setup
|
||||||
Mistborn will generate the Wireguard configuration script for the Gateway. From a base Ubuntu/Debian/Raspbian operating system the following packages are recommended to be installed beforehand:
|
Mistborn will generate the Wireguard configuration script for the Gateway. From a base Ubuntu/Debian/Raspbian operating system the following packages are recommended to be installed beforehand:
|
||||||
|
|
||||||
@@ -209,6 +218,17 @@ The `dev/` folder contains a script for completing a hard reset: destroying and
|
|||||||
sudo ./dev/rebuild.sh
|
sudo ./dev/rebuild.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Troubleshooting Docker
|
||||||
|
Instead of defaulting to a system DNS server, Docker will try to use a public DNS server (e.g. 8.8.8.8). If you're having issues pulling or building Docker containers with "failure to connect" errors, this is the likely problem. You can manually set the DNS server Docker should use with the `DOCKER_OPTS` field in `/etc/default/docker`. Example:
|
||||||
|
```
|
||||||
|
DOCKER_OPTS="--dns 192.168.50.1 --dns 1.1.1.1"
|
||||||
|
```
|
||||||
|
|
||||||
|
Be sure to restart Docker afterward:
|
||||||
|
```
|
||||||
|
sudo systemctl restart docker
|
||||||
|
```
|
||||||
|
|
||||||
# Contact
|
# Contact
|
||||||
|
|
||||||
Contact me at [steven@cyber5k.com](mailto:steven@cyber5k.com)
|
Contact me at [steven@cyber5k.com](mailto:steven@cyber5k.com)
|
||||||
|
|||||||
+14
-1
@@ -86,6 +86,12 @@ pushd .
|
|||||||
cd /opt/mistborn
|
cd /opt/mistborn
|
||||||
git submodule update --init --recursive
|
git submodule update --init --recursive
|
||||||
|
|
||||||
|
# initial load update package list
|
||||||
|
sudo apt-get update
|
||||||
|
|
||||||
|
# install figlet
|
||||||
|
sudo apt-get install -y figlet
|
||||||
|
|
||||||
# get os and distro
|
# get os and distro
|
||||||
source ./scripts/subinstallers/platform.sh
|
source ./scripts/subinstallers/platform.sh
|
||||||
|
|
||||||
@@ -133,7 +139,10 @@ source ./scripts/subinstallers/cockpit.sh
|
|||||||
# Mistborn
|
# Mistborn
|
||||||
# final setup vars
|
# final setup vars
|
||||||
iface=$(ip -o -4 route show to default | egrep -o 'dev [^ ]*' | awk '{print $2}')
|
iface=$(ip -o -4 route show to default | egrep -o 'dev [^ ]*' | awk '{print $2}')
|
||||||
IPV4_PUBLIC=$(ip -o -4 route show default | egrep -o 'dev [^ ]*' | awk '{print $2}' | xargs ip -4 addr show | grep 'inet ' | awk '{print $2}' | grep -o "^[0-9.]*" | tr -cd '\11\12\15\40-\176' | head -1) # tail -1 to get last
|
figlet "Mistborn default NIC: $iface"
|
||||||
|
|
||||||
|
#IPV4_PUBLIC=$(ip -o -4 route show default | egrep -o 'dev [^ ]*' | awk '{print $2}' | xargs ip -4 addr show | grep 'inet ' | awk '{print $2}' | grep -o "^[0-9.]*" | tr -cd '\11\12\15\40-\176' | head -1) # tail -1 to get last
|
||||||
|
IPV4_PUBLIC="10.2.3.1"
|
||||||
|
|
||||||
# clean
|
# clean
|
||||||
if [ -f "/etc/systemd/system/Mistborn-base.service" ]; then
|
if [ -f "/etc/systemd/system/Mistborn-base.service" ]; then
|
||||||
@@ -216,3 +225,7 @@ sudo tar -czf ../mistborn_backup/mistborn_volumes_backup.tar.gz ../mistborn_volu
|
|||||||
sudo systemctl enable Mistborn-base.service
|
sudo systemctl enable Mistborn-base.service
|
||||||
sudo systemctl start Mistborn-base.service
|
sudo systemctl start Mistborn-base.service
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
figlet "Mistborn Installed"
|
||||||
|
echo "Watch Mistborn start: sudo journalctl -xfu Mistborn-base"
|
||||||
|
echo "Retrieve Wireguard default config for admin: sudo docker-compose -f /opt/mistborn/base.yml run --rm django python manage.py getconf admin default"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Cockpit
|
# Cockpit
|
||||||
echo "Installing Cockpit"
|
figlet "Mistborn: Installing Cockpit"
|
||||||
if [ "$DISTRO" == "ubuntu" ]; then
|
if [ "$DISTRO" == "ubuntu" ]; then
|
||||||
echo "Ubuntu backports enabled by default"
|
echo "Ubuntu backports enabled by default"
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Docker
|
# Docker
|
||||||
|
figlet "Mistborn: Installing Docker"
|
||||||
|
|
||||||
# dependencies
|
# dependencies
|
||||||
echo "Installing Docker dependencies"
|
echo "Installing Docker dependencies"
|
||||||
sudo apt-get install -y \
|
sudo apt-get install -y \
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
figlet "Mistborn: Container Credentials"
|
||||||
|
|
||||||
# generate production .env file for Django
|
# generate production .env file for Django
|
||||||
mkdir -p ./.envs/.production
|
mkdir -p ./.envs/.production
|
||||||
DJANGO_PROD_FILE="./.envs/.production/.django"
|
DJANGO_PROD_FILE="./.envs/.production/.django"
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
figlet "Mistborn: Configuring Firewall"
|
||||||
|
|
||||||
echo "stop iptables wrappers"
|
echo "stop iptables wrappers"
|
||||||
if [ "$DISTRO" == "ubuntu" ]; then
|
if [ "$DISTRO" == "ubuntu" ]; then
|
||||||
@@ -91,10 +92,6 @@ sudo ip6tables -P INPUT DROP
|
|||||||
sudo ip6tables -P FORWARD DROP
|
sudo ip6tables -P FORWARD DROP
|
||||||
sudo ip6tables -P OUTPUT ACCEPT
|
sudo ip6tables -P OUTPUT ACCEPT
|
||||||
|
|
||||||
|
|
||||||
# initial load update package list
|
|
||||||
sudo apt-get update
|
|
||||||
|
|
||||||
# iptables-persistent
|
# iptables-persistent
|
||||||
if [ ! "$(dpkg-query -l iptables-persistent)" ]; then
|
if [ ! "$(dpkg-query -l iptables-persistent)" ]; then
|
||||||
echo "Installing iptables-persistent"
|
echo "Installing iptables-persistent"
|
||||||
|
|||||||
@@ -10,5 +10,5 @@ if [ "$UNAME" == "linux" ]; then
|
|||||||
DISTRO=$(cat /etc/os-release | awk -F= '/^ID=/{print $2}')
|
DISTRO=$(cat /etc/os-release | awk -F= '/^ID=/{print $2}')
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "UNAME: $UNAME"
|
figlet "UNAME: $UNAME"
|
||||||
echo "DISTRO: $DISTRO"
|
figlet "DISTRO: $DISTRO"
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
figlet "Mistborn: Installing Wireguard"
|
||||||
|
|
||||||
# Wireguard
|
# Wireguard
|
||||||
if [ "$DISTRO" == "raspbian" ]; then
|
if [ "$DISTRO" == "raspbian" ]; then
|
||||||
echo "Adding Wireguard repo keys"
|
echo "Adding Wireguard repo keys"
|
||||||
|
|||||||
Reference in New Issue
Block a user