4 ms·
> When I containerized MongoDB, Docker helpfully inserted an allow rule into iptables, opening up MongoDB to the world Can Docker really be blamed here? It so
by nickjj 5y ago
> When I containerized MongoDB, Docker helpfully inserted an allow rule into iptables, opening up MongoDB to the world
Can Docker really be blamed here?
It sounds like when they ran MongoDB they explicitly published Mongo's port to the internet by either adding the ports property to docker-compose.yml or the -p flag with a Docker command to open Mongo's port to the outside world.
Not to pour salt on an open wound but why are they blaming Docker for this? Surely an ops person should have thought to check if any internal services are exposed to the outside world? This goes with or without using Docker. This would be like explicitly opening a port with iptables by copy / pasting something off the internet and then blaming iptables because it opened the port.
If anyone is curious, years ago I've blogged about the difference between expose and publish for Docker at https://nickjanetakis.com/blog/docker-tip-59-difference-between-exposing-and-publishing-ports https://nickjanetakis.com/blog/docker-tip-59-difference-betw....
- XorNot 5y agoOr there just should've been a password. This whole incident would've been prevented and hopefully eventually rectified if they'd put auth on the localhost interface as well. Let your tools save passwords, but it's insanity to have anything just blindly accept requests - you're one mis-directed script away from people wiping out your prod DB, let alone dedicated hackers.
- nickjj 5y agoYeah, passwords are good. I remember back in 2016 I had a similar issue with Redis. I ran it with -p 6379:6379 with no password and someone got into my Redis container back when "crackit"[0] was a thing. But I never blamed Docker or Redis. I blamed myself because I was careless for not fully understanding the implications of what -p did at the time. [0]: http://antirez.com/news/96 http://antirez.com/news/96