Replies: 1 comment 6 replies
-
I just watched this video by @Luap99, and one of the key things mentioned that stuck with me is:
Earlier in the video he demonstrated how a bridge/custom network, created via The proposed solution is to use pasta, which does preserve source IP, to connect to a rootless bridge/custom network; however, it sounds like that currently isn't possible but is being worked on (see timestamp 21:23). Also, I re-read the discussion about rootful vs rootless security and realized I missed something quite important in a thread where @rhatdan explains:
So, now it seems like I basically have two options:
There is a possible third option which involves using socket activation, but that seems a bit more complicated to me and it isn't actually clear if would solve all the issues: https://www.reddit.com/r/podman/comments/1c46q54/comment/kzpt6v9/. So, I think I can now revise my question to be a bit more specific. Basically, am I right in thinking that the 3 options above are currently the best ways to run a production web server that proxies traffic to a few containerized apps? Am I missing any other options or security concerns? |
Beta Was this translation helpful? Give feedback.
-
Hello,
I am a beginner looking for advice on the most secure way / best practices to set up a simple web server with Podman containers.
I would like to run a few websites/apps in containers and have Caddy running in a container for my server. I've been struggling a bit with Podman networking, and posted a question about preserving IP addresses on the Caddy forum as well as in the Podman discord. Here is a link to the Caddy forum where I fully document that question: https://caddy.community/t/preserving-source-ip-in-rootless-podman-network/25461.
However, as I was doing more research about networking, I ran across this discussion here about how using rootfull Podman might be more secure: #13728
So, now I think I should take a step back to learn if what I was trying to do in my forum post above is actually the right move.
The goal is to have a simple VPS running Debian 12, some IP-aware security measures like fail2ban, a Caddy webserver, some web apps running PHP (Wordpress, Kirby, etc.), and maybe an app running Node (Plausible/Umami for analytics).
What would be the best practice for this setup? The route I was originally going was to use rootless Podman to have a Caddy container in its own Pod, and then have other pods for each of the apps. I was originally thinking that something like fail2ban would be run directly on the server, but I also saw some mentions that made me think people were running that in a container or maybe they were running all of their containers in a container. I'm not exactly sure.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions