Add more scripts
This commit is contained in:
parent
03ab6ee918
commit
ddb6d7dcd1
10 changed files with 14 additions and 1 deletions
4
readme
Normal file
4
readme
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
Configs for debian 12 setup.
|
||||||
|
|
||||||
|
Clone to $HOME, run ./scripts/full.sh and pray.
|
||||||
|
|
|
@ -12,8 +12,12 @@ sudo apt install -y \
|
||||||
python3-pip \
|
python3-pip \
|
||||||
vim
|
vim
|
||||||
|
|
||||||
|
sudo cp "$HOME/.vimrc" /root/.vimrc
|
||||||
|
|
||||||
|
./zfs.sh
|
||||||
./sshd.sh
|
./sshd.sh
|
||||||
./nginx.sh
|
./nginx.sh
|
||||||
./ufw.sh
|
./ufw.sh
|
||||||
./podman.sh
|
./podman.sh
|
||||||
./unattended.sh
|
./unattended.sh
|
||||||
|
./beszel.sh
|
|
@ -4,5 +4,8 @@ set -euo pipefail
|
||||||
|
|
||||||
sudo apt install -y podman
|
sudo apt install -y podman
|
||||||
|
|
||||||
|
sudo mkdir -p /etc/containers/
|
||||||
|
sudo cp "$HOME/.config/containers/storage.conf" /etc/containers/storage.conf
|
||||||
|
|
||||||
systemctl --user enable podman.socket
|
systemctl --user enable podman.socket
|
||||||
systemctl --user start podman.socket
|
systemctl --user start podman.socket
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
# TODO: just 'sed' the usual hardenings
|
# TODO: 'sed' automate the usual hardenings
|
||||||
sudo vim /etc/ssh/sshd_config
|
sudo vim /etc/ssh/sshd_config
|
||||||
|
|
||||||
if ! sudo sshd -t; then
|
if ! sudo sshd -t; then
|
|
@ -7,9 +7,11 @@ sudo apt install -y ufw
|
||||||
sudo ufw default deny incoming
|
sudo ufw default deny incoming
|
||||||
sudo ufw default allow outgoing
|
sudo ufw default allow outgoing
|
||||||
|
|
||||||
|
# Allow SSH port
|
||||||
port=$(cat /etc/ssh/sshd_config | grep -o 'Port [0-9]*' | grep -o '[0-9]*')
|
port=$(cat /etc/ssh/sshd_config | grep -o 'Port [0-9]*' | grep -o '[0-9]*')
|
||||||
sudo ufw allow "$port/tcp"
|
sudo ufw allow "$port/tcp"
|
||||||
|
|
||||||
|
# Allow Nginx if installed
|
||||||
if ! which nginx; then
|
if ! which nginx; then
|
||||||
sudo ufw allow "Nginx Full"
|
sudo ufw allow "Nginx Full"
|
||||||
fi
|
fi
|
Loading…
Add table
Add a link
Reference in a new issue