2 ms·
> What percentage of the documentation had you read and internalized before you first put Docker into production? Admittedly, not as much (and since I've got a
by mschuster91 5y ago
> What percentage of the documentation had you read and internalized before you first put Docker into production?
Admittedly, not as much (and since I've got a couple of years experience, back then the docs were bananaware), which is why I ran into the same issue - but one thing I always do is set up staging environments and check if at least the basic expectations (=can't reach an internal service from the Internet, but can reach public services) are working. Aka: a portscan.
A basic check would have prevented so many carelessly-configured services. Generally, it doesn't hurt anyone to run a nmap scan as part of the regular monitoring - if the line count doesn't match the previous one, raise an alarm.
- wpietri 5y agoOh, is that also in the docs? My point is that this is the same behavior: looking for a reason why the person is wrong. That is a behavior that makes things worse because it takes the focus away from systemic improvements that make us safer. Please don't do it.
- mschuster91 5y ago> That is a behavior that makes things worse because it takes the focus away from systemic improvements that make us safer. Systemic improvement would be to educate people to build fail-resilient systems. There are a number of reasonable precautions that could have prevented all of these "I exposed my unsecured MongoDB docker to the Internet" instances: 1) Dedicated hardware firewalls (or in the cloud, firewall rules): If all your server is accessible on is 80/443 anyway from the Internet, it doesn't matter if you punch a hole in the server's firewall. 2) Regular outside port scanning as part of your monitoring. This helps you catch misconfigurations of your firewall. 3) When planning a new infrastructure, think about which system needs access to which other systems. Your MongoDB doesn't need to have an Internet connection 4) Have someone experienced look over your staging system, do a full scale security audit or attempt basic measures of pentesting on your own. 5) Don't copy shit from stackoverflow or years old random blog post without understanding every single thing it does. 6) Don't use MongoDB which has been so fucking often in the news for being an insecure pile of dog poo that it physically hurts to read that name! Organizations that fail to do at least the first four points as part of standard operating procedures deserve to be hacked, period. There is no excuse for slacking off on either of these in 2021.