Skip to content

Instantly share code, notes, and snippets.

@jordangraft
Last active April 28, 2016 19:47
Show Gist options
  • Save jordangraft/2333e662f2b9ca5c3696dd18cc844a22 to your computer and use it in GitHub Desktop.
Save jordangraft/2333e662f2b9ca5c3696dd18cc844a22 to your computer and use it in GitHub Desktop.
Linux ubuntu
nano /etc/ssh/sshd_config # change PermitRootLogin to no and PasswordAuthentication to no
sudo service ssh restart
sudo apt-get update
sudo apt-get install ntp ufw git fail2ban default-jre nodejs
sudo dpkg-reconfigure tzdata
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow 22/tcp
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw enable
sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
sudo nano /etc/fail2ban/jail.conf # add your ip address to the ignore ip line so that you don’t get locked out
sudo service fail2ban restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment