Skip to content

Instantly share code, notes, and snippets.

@LudusLight
Last active January 6, 2019 21:52
Show Gist options
  • Save LudusLight/71d9e11b50d518e7af50a8909e2ba02d to your computer and use it in GitHub Desktop.
Save LudusLight/71d9e11b50d518e7af50a8909e2ba02d to your computer and use it in GitHub Desktop.
Ludus's Server Init Script
#!/usr/bin/env bash
# apt
apt update
apt upgrade -y
apt install snap ufw byobu fail2ban git zsh unattended-upgrades curl -y
# ufw stuff
yes | ufw enable
ufw allow 63682
ufw allow from $(echo $SSH_CLIENT | awk '{ print $1}') to any port 19999
# changing default ssh port to 63682
sed -i 's/#Port 22/Port 63682/' /etc/ssh/sshd_config
service ssh restart
service ufw restart
# netdata
bash <(curl -Ss https://my-netdata.io/kickstart.sh) --dont-wait
# enable byobu by default
byobu-enable
# oh-my-zsh
chsh -s $(which zsh)
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment