Install avahi
This commit is contained in:
parent
2534c36844
commit
ad74f467fb
27
init.sh
27
init.sh
@ -2,25 +2,26 @@
|
||||
|
||||
#Nginx Repo setup
|
||||
echo '[#] Installing pre-requisites'
|
||||
sudo apt install -y curl gnupg2 ca-certificates lsb-release debian-archive-keyring git
|
||||
sudo apt install -y curl gnupg2 ca-certificates lsb-release debian-archive-keyring git > /dev/null
|
||||
echo '[#] NGINX Repo setup'
|
||||
curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor | sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null
|
||||
gpg --dry-run --quiet --no-keyring --import --import-options import-show /usr/share/keyrings/nginx-archive-keyring.gpg
|
||||
echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] http://nginx.org/packages/debian `lsb_release -cs` nginx" | sudo tee /etc/apt/sources.list.d/nginx.list
|
||||
gpg --dry-run --quiet --no-keyring --import --import-options import-show /usr/share/keyrings/nginx-archive-keyring.gpg > /dev/null
|
||||
echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] http://nginx.org/packages/debian `lsb_release -cs` nginx" | sudo tee /etc/apt/sources.list.d/nginx.list > /dev/null
|
||||
echo '[#] Updating APT cache'
|
||||
sudo apt update
|
||||
sudo apt update > /dev/null
|
||||
|
||||
#Crowdsec Repo setup
|
||||
echo '[#] Crowdsec Repo setup'
|
||||
curl -s https://install.crowdsec.net | sudo sh
|
||||
curl -s https://install.crowdsec.net | sudo sh > /dev/null
|
||||
|
||||
#Package install
|
||||
echo '[#] Installing packages'
|
||||
sudo apt install -y iptables rsyslog nginx crowdsec crowdsec-firewall-bouncer-iptables wireguard
|
||||
sudo apt install -y iptables nginx crowdsec crowdsec-firewall-bouncer-iptables wireguard avah-daemon > /dev/null
|
||||
|
||||
#rsyslog setup
|
||||
echo '[#] syslog forwarder setup'
|
||||
echo '*.* 10.0.100.34:514' | sudo tee /etc/rsyslog.conf > /dev/null
|
||||
sudo apt install -y rsyslog
|
||||
echo '*.* 10.0.100.34:514' | sudo tee --append /etc/rsyslog.conf > /dev/null
|
||||
sudo systemctl enable rsyslog
|
||||
sudo systemctl start rsyslog
|
||||
|
||||
@ -36,3 +37,15 @@ curl http://git.lan.fisherhome.xyz/matthew/project_tunnelfin/raw/branch/main/aut
|
||||
#Start wireguard service
|
||||
echo '[#] Starting Wireguard service'
|
||||
sudo systemctl enable --now wg-quick@wg0
|
||||
|
||||
#Setup iptables
|
||||
#iptables -A INPUT -i lo -j ACCEPT
|
||||
#iptables -A OUTPUT -o lo -j ACCEPT
|
||||
#iptables -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
|
||||
#iptables -A OUTPUT -p tcp --sport 22 -m state --state ESTABLISHED -j ACCEPT
|
||||
#iptables -P INPUT DROP
|
||||
#iptables -P OUTPUT DROP
|
||||
|
||||
#Setup Nginx
|
||||
sudo apt install -y lua5.1 libnginx-mod-http-lua luarocks gettext-base lua-cjson
|
||||
sudo apt install -y crowdsec-nginx-bouncer
|
Loading…
Reference in New Issue
Block a user