modified: init.sh

This commit is contained in:
Matthew Fisher 2024-07-29 20:02:33 -05:00
parent ad74f467fb
commit 7759107ad7

15
init.sh
View File

@ -16,12 +16,12 @@ curl -s https://install.crowdsec.net | sudo sh > /dev/null
#Package install
echo '[#] Installing packages'
sudo apt install -y iptables nginx crowdsec crowdsec-firewall-bouncer-iptables wireguard avah-daemon > /dev/null
sudo apt install -y iptables nginx crowdsec crowdsec-firewall-bouncer-iptables wireguard avahi-daemon > /dev/null
#rsyslog setup
echo '[#] syslog forwarder setup'
sudo apt install -y rsyslog
echo '*.* 10.0.100.34:514' | sudo tee --append /etc/rsyslog.conf > /dev/null
echo '*.* @10.0.100.34:514' | sudo tee --append /etc/rsyslog.conf > /dev/null
sudo systemctl enable rsyslog
sudo systemctl start rsyslog
@ -46,6 +46,17 @@ sudo systemctl enable --now wg-quick@wg0
#iptables -P INPUT DROP
#iptables -P OUTPUT DROP
#Setup Avahi
sudo systemctl start avahi-daemon
sudo systemctl enable avahi-daemon
#Setup Nginx
sudo apt install -y lua5.1 libnginx-mod-http-lua luarocks gettext-base lua-cjson
sudo apt install -y crowdsec-nginx-bouncer
#Setup Telegraf
wget -q https://repos.influxdata.com/influxdata-archive_compat.key
echo '393e8779c89ac8d958f81f942f9ad7fb82a25e133faddaf92e15b16e6ac9ce4c influxdata-archive_compat.key' | sha256sum -c && cat influxdata-archive_compat.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg > /dev/null
echo 'deb [signed-by=/etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg] https://repos.influxdata.com/debian stable main' | sudo tee /etc/apt/sources.list.d/influxdata.list
sudo apt-get update && sudo apt-get install telegraf