Docs/BashScripts
2025-03-21 14:16:43 +01:00
..
2022-12-22 08:25:05 +01:00
2023-04-05 11:08:38 +02:00
2024-03-24 10:18:19 +01:00
2023-08-23 11:00:36 +02:00
2023-03-07 15:46:33 +01:00

Bash Scripts

Install Apache and Samba

sudo su -c "bash <(wget -qO- https://git.myspace.nu/MySpace/Docs/raw/branch/master/BashScripts/install-apache.sh)"

Optionally install uCMS

cd /var/www/cms/www
git clone https://git.myspace.nu/MySpace/uCMS-3.git .
chmod -R ugo+rwx ./

Install MySQL

sudo su -c "bash <(wget -qO- https://git.myspace.nu/MySpace/Docs/raw/branch/master/BashScripts/install-mysql.sh)"

Install UFW (and disable iptables)

sudo su -c "bash <(wget -qO- https://git.myspace.nu/MySpace/Docs/raw/branch/master/BashScripts/install-ufw.sh)"

Install Bind

sudo su -c "bash <(wget -qO- https://git.myspace.nu/MySpace/Docs/raw/branch/master/BashScripts/install-bind.sh)"

Install Samba Active Directory Domain Controller

sudo su -c "bash <(wget -qO- https://git.myspace.nu/MySpace/Docs/raw/branch/master/BashScripts/install-ubuntu-dc.sh)"

Combind with pi.hole by running

curl -sSL https://install.pi-hole.net | bash

And update /etc/samba/smb.conf with dns forwarder = <IP-of-pi.hole> and make sure the DHCP uses the dc as DNS.

Install Wireguard

sudo su -c "bash <(wget -qO- https://git.myspace.nu/MySpace/Docs/raw/branch/master/BashScripts/install-wireguard-server.sh)"

Add user

wg-adduser.sh

Allow single user full LAN access, add this to /etc/wireguard/wg0.conf. -s 192.168.200.3 is the source (client) IP address. Iptables rules are evaluated from top to bottom, looking for the first match. The rest of the rules will be ignored.

PostUp = iptables -A FORWARD -i %i -s 192.168.200.3/32 -j ACCEPT
...
PostDown = iptables -D FORWARD -i %i -s 192.168.200.3/32 -j ACCEPT

Install VM Tweaks

sudo su -c "bash <(wget -qO- https://git.myspace.nu/MySpace/Docs/raw/branch/master/BashScripts/vm-tweaks.sh)"