Some steps to setting up an Ubuntu server on a EPFL VM:
# Install VMware tools
sudo apt-get install open-vm-tools
# Be sure the locales are well generated
sudo locale-gen fr_CH fr_CH.UTF-8
sudo update-locale
# Add another user and add it to sudoers
sudo adduser admin
sudo adduser admin sudo
# Enable byobu
byobu-enable
# Install base software
sudo apt-get install vim git
# Install ssmtp (https://wiki.epfl.ch/igmit/soft/ssmtp)
sudo apt-get install ssmtp
sudo vim /etc/ssmtp/ssmtp.conf
sudo vim /etc/ssmtp/revaliases
# Secure you server
Edit /etc/ssh/sshd_config to set "PermitRootLogin" to no. (Note: without-password means only with ssh-key, may be useful for some scripts)
"nospoof on" in /etc/host.conf
sudo apt-get install fail2ban
sudo vi /etc/fail2ban/jail.conf (enable service you want, ssh, apache, ...)
sudo service fail2ban restart
sudo fail2ban-client status
sudo apt-get install rkhunter chkrootkit
sudo chkrootkit
sudo rkhunter --update
sudo rkhunter --propupd
sudo rkhunter --check
sudo apt-get install nmap
nmap -v -sT localhost
sudo nmap -v -sS localhost
sudo apt-get install logwatch
sudo logwatch | less
sudo logwatch --mailto igmgesrv2@groupes.epfl.ch --output mail --format html --range 'between -7 days and today'
# Links
- https://www.thefanclub.co.za/how-to/how-secure-ubuntu-1204-lts-server-part-1-basics