core.autocrlf=true is set for this Windows checkout, so the scripts were previously checked out with CRLF, which breaks a shebang and heredocs when a script is run on Linux or from WSL. Pin eol=lf for *.sh.
Shell Scripts
Tip: Install Docker Engine on Debian/Ubuntu.
curl -fsSL https://git.vanusys.com/VanuSystems/shell-scripts/raw/branch/main/install-docker.sh | sudo bash
Tip: Configure registry mirrors for Docker and restart the daemon.
curl -fsSL https://git.vanusys.com/VanuSystems/shell-scripts/raw/branch/main/set-docker-mirror.sh | sudo bash
Tip: Install Caddy web server on Debian/Ubuntu/Raspbian.
curl -fsSL https://git.vanusys.com/VanuSystems/shell-scripts/raw/branch/main/install-caddy.sh | sudo bash
Tip: Append 2-space indent settings to
~/.vimrc.
curl -fsSL https://git.vanusys.com/VanuSystems/shell-scripts/raw/branch/main/set-vim-2space.sh | bash
Tip: Set up fail2ban with a strict profile (3 failures -> 24h ban, repeat offenders -> 1 week).
curl -fsSL https://git.vanusys.com/VanuSystems/shell-scripts/raw/branch/main/setup-fail2ban.sh | sudo bash
Override the detected SSH port, the sshd filter mode (normal by default: aggressive
also counts pre-auth client disconnects as failures, which bans legitimate users) or
whitelist an extra address:
curl -fsSL https://git.vanusys.com/VanuSystems/shell-scripts/raw/branch/main/setup-fail2ban.sh | sudo SSH_PORT=22,2222 IGNORE_IP=198.51.100.0/24 bash
Note: the script whitelists the address of the current session when it can detect it (
SSH_CONNECTION,SSH_CLIENT, or the utmp entry of its terminal). Piped throughcurl ... | sudo bashthere is no terminal, so it prints a warning and you should passIGNORE_IP=<your address>yourself — otherwise 3 failed attempts ban you for 24h (and 3 bans for a week).
Note: the script refuses to continue when fail2ban's
logtargetis not a file (SYSLOG,STDERR, ...), because therecidivejail reads that file to count bans and could otherwise never fire. Setlogtarget = /var/log/fail2ban.login/etc/fail2ban/fail2ban.localand re-run.