this post was submitted on 03 Feb 2025
34 points (100.0% liked)

Selfhosted

46677 readers
224 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS
34
submitted 3 months ago* (last edited 3 months ago) by [email protected] to c/[email protected]
 

I had to restore my homelab and took the opportunity to move from docker to rootless podman quadlets. Well almost full rootless, I kept pi-hole and caddy at the root level because I did not want to deal with sysctl.

I have everything running but for now I have to disable my firewall. With docker I was using this script: https://github.com/chaifeng/ufw-docker But I’m having a hard time finding an alternative for podman.

Do you know how any scripts that would magically fix podman and ufw? Would it be a better solution for me to manage iptables manually?

My needs are pretty simple as I do not really care if the ports are visible on my private network, I just want to allow specific IPs on port 80 and 443.

Edit: the issue I’m facing is that I’m allowing some specific IPs to access my network, but when I enable ufw the traffic is blocked. I had the same rules using docker and everything was working fine. I can notice that sometimes the traffic goes through and other time it is blocked. Much like with docker when you don’t use the script and the traffic will be blocked or not depending on what wrote the iptables rules last.

Edit2: So actually the issue was with some routing. Running this command fixes everything: ufw route allow in on wlan0 out on cni-podman0

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 7 points 3 months ago* (last edited 3 months ago) (4 children)

Does Podman actually open the ports like Docker do? I was of the impression it did not. But it's entirely possible that I might be wrong.

I would be disappointed if it did. I'm moving to Podman as well just because of the firewall issue in Docker.

Edit: After some searching I'm convinced Podman does not mess with the firewall unless instructed to do so. Have you tested that the ports are actually opened up?

[–] [email protected] 2 points 3 months ago (3 children)

I should have clarified this. It does not open the ports, but I have setup my firewall to allow a range of IP and the traffic is still blocked.

I have noticed some inconsistency in the behavior, where the traffic would sometimes work upon ufw activation but never work upon reboot. Knowing how docker works, I thought podman would also mess with the firewall. But maybe the issue comes from something else.

[–] [email protected] 1 points 3 months ago

That does sound like it's something else.

load more comments (2 replies)
load more comments (2 replies)