I’m not crazy about leaving user accounts, (even just the name of it, and the public keys exposed in a public file for the life of the server… but I kept looking at the User Data to see what else I could automate. I thought I was installing an uncomplicated firewall and fail2ban along with sendmail (which someone suggested would be pre-installed anyways). But I’m not getting my test email. Is it case sensitive? Can I tell if the fail2ban and ufw are loading the way I assumed they were? (without inadvertently installing them when I try to check) Then I leave myself a quarter hour to finish setting up the basics before shutting down for a snapshot.
#cloud-config package_upgrade: true runcmd: - ufw allow ssh - ufw allow 25 - ufw enable - apt-get install sendmail - service sendmail restart - time echo testmail | sendmail JonDoe@gmail.com - apt-get install fail2ban -y - service fail2ban restart power_state: timeout: 120 delay: "+14" message: Gooble Snot, Please save your work. mode: poweroff
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $100 of credit to try our products over 60 days!