- reverse proxy to backend webserver
- run checks on each request on the reverse proxy
- close all ports except what needs to be open
- only allow access to what needs to be seen
- perform frequent security updates (script it, automate it, run it hourly)
- never install more software then strictly required
- never allow SSH directly to your public address
- for ssh, use custom ports, cert (4096b) with passwords
- install logwatch or something else that will inform you about logs (elk stack)
- automate checks in logs for tell-tale signs of scriptkiddies (attempted access to /wp-admin or phpmyadmin for example) => automate adding source IP's to firewalls
- frequently check for malicious code (clamav, rkhunter, ...)
- only use stable and tested software
- only use stable and tested OS (Centos/redhat. DO NOT run production on anything else, especially ubuntu.)
- do not use ubuntu for production. it is not suited.
- install failtoban
from dev pov:
- implement measures to prevent sql injection
- don't require production to install dev libraries
- don't require production to install packages only available on ubuntu
- log strange behaviour to a file, make sure actions can be automated (iptable drop)
I'm no dev, but those are things I'd like dev's to do with their software.