Skip to content

Instantly share code, notes, and snippets.

@HysMagus
Created November 29, 2017 18:17
Show Gist options
  • Save HysMagus/d4d9d4c951ca02c809bc763183cce86a to your computer and use it in GitHub Desktop.
Save HysMagus/d4d9d4c951ca02c809bc763183cce86a to your computer and use it in GitHub Desktop.
#!bin/bash
ufw allow ssh/tcp
ufw limit ssh/tcp
ufw allow 8168/tcp
ufw logging on
ufw enable
fallocate -l 4G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
echo "Add this to the end of the file Add the following line at the end of the file press tab to separate each word/number"
echo "/swapfile none swap sw 0 0"
nano /etc/fstab
reboot now
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment