r/podman

Memory-Safe Secure Time: Setting up ntpd-rs + NTS on Firewalla
▲ 30 r/podman+1 crossposts

Memory-Safe Secure Time: Setting up ntpd-rs + NTS on Firewalla

After successfully scripting `Chrony` on my Firewalla to fetch time via NTS and serve it to the LAN via NTP interception, I decided to see if I could replicate the setup using ntpd-rs. Turns out, it works perfectly.

While `Chrony` is Ubuntu's current default for NTS support (preventing MITM and spoofing attacks), Canonical is moving away from C-based utilities toward Rust. They will likely switch to ntpd-rs soon, potentially as early as 26.10 but definitely by 27.04, mirroring their recent shifts with tools like sudo-rs.

I’ve been running ntpd-rs on my Firewalla Gold Plus for a few days now, and it has been rock solid.

If you want to check them out, I’ve published updated scripts for both setups:

I would love it if, in the future, Firewalla used `Chrony` or `ntpd-rs` as the default timekeeper for Firewalla. Since Firewalla is security minded, the ability to use NTS as the canonical timekeeper serving secure time to the LAN network via NTP Intercept would be unique in this space (afaik competitors don't offer this) and trivial to set up, as I've shown. If they choose `ntpd-rs`, then there's even more memory-safe security with rust vs C.

Also, a quick plug for my other Firewalla-related GitHub scripts:

  • Install Huge Blocklists: Allows MSP Lite users to install and update massive (or any non-MSP/app available...) custom lists (like HaGeZi Pro++ or OISD Big) via the CLI. Tradeoff: Blocked events won't show up in the MSP or app GUI but can be viewed via CLI.
  • Unbound DoT Config + Tweaks: Sets up DNS-over-TLS (DoT) for IPv4 +/- IPv6 with a fallback to standard plaintext resolving, plus optimizes buffer settings to boost your DNS speed and also includes a few security tweaks.
  • Set up a Suricata Test Box: Thinking about upgrading to a Firewalla Pro for Suricata? This lets you test drive Suricata first to see how it works and if the upgrade is worth it for you.
u/Great-Cow7256 — 2 days ago
▲ 2 r/podman

Possible workaround for container not having outbound connectivity on Debian 13

My rootless containers were losing outbound connectivity after reboots. Restarting the containers or the services did not solve the issue. It seems the issue is unique to older Podman or Passta version in Debian/Ubuntu, I found workarounds in the repo and just thought I'd keep a record.

As I understand it, the issue stem from a race condition. Pasta and the containers are started before proper routes on host. The workaround is to ensure IPV4 connectivity in the wait-online service. My implementation is based on those mentioned on Github:


On Debian, the wait service is located under /usr/lib/systemd/user/podman-user-wait-network-online.service, but we can set overrides to it

mkdir .config/systemd/user/podman-user-wait-network-online.service.d

touch .config/systemd/user/podman-user-wait-network-online.service.d/override.conf

Put something like this in there:

[Service]
TimeoutStartSec=180s
ExecStart=
ExecStart=/bin/sh -c 'until systemctl is-active --quiet network-online.target && /usr/bin/curl -4 --fail --silent --output /dev/null --connect-timeout 3 --max-time 5 https://www.google.com/generate_204; do sleep 0.5; done'

Reload and restart

systemctl --user daemon-reload

systemctl --user start podman-user-wait-network-online.service

https://github.com/podman-container-tools/podman/issues/25656#issuecomment-2802298212

https://github.com/podman-container-tools/podman/issues/25656

https://github.com/podman-container-tools/podman/issues/25859

reddit.com
u/hellociaagent — 3 days ago
▲ 45 r/podman+2 crossposts

fantastic: latest llama.cpp server webui can now run commands for tools into rootless sandboxed containers

while having much fun testing LLMs Houdini-like attitudes and abilities to evade, excalate and escape from carefully reciprocally arranged security enhancing sandboxing VMs, containers, namespaces and jails, I've discovered a new revolutionary option to let llama-server (build 10423) to launch guest containers (running for ex. bare bones linux distros like Alpine) as sandboxes for securely (rootless) running shell commands for its tools (enabled with the "--tools" option) directly from the llama-server webui.

The new (experimental) option is called "--tools-runtime" and the initial argument to it that I suggest you to try is "podman:alpine" (or "docker:alpine").

The server will also download the indicated container image and then instantiate it. Of course podman (preferred by myself) or docker have to be installed beforehand on the host.

Enjoy!

P.S. almost forgot! The --tools-runtime option can also run commands, invoked by the server native tools, on a remote host, by accepting as argument the additional target "ssh:user@host" where remote access to that account has been previously authorized

reddit.com
u/DevelopmentBorn3978 — 6 days ago
▲ 7 r/podman+1 crossposts

Podman NetBird server quadlet?

Hi,

I'm trying to set up a NetBird quadlet, especially the server-variant where you host the things yourself and are not dependent on an external auth-service.

However, since I'm pretty new to containerization in general and quadlets, I have tried to ask Google AI for a quadlet-file (it worked pretty well to have a starting point for things like caddy, pihole, nextcloud and immich, so I gave it a try), but it's pretty useless for NetBird... it gave me many different answers and at some point just went in circles.

So I hoped that any of you already have a quadlet/container with NetBird server (and maybe even caddy instead of traefik) set up or can help me get this to work.

I don't have the quadlet-configs google gave me anymore tho since I wanted to start fresh.

reddit.com
u/green1t — 6 days ago
▲ 14 r/podman

Chainguard alternative for a rootless podman setup, compared it against Docker Hardened Images and Minimus.

Standing up a build platform on rootless podman, gov-adjacent customer that scans everything to death, so I needed hardened base images and went looking for a Chainguard alternative rather than defaulting to the pricey incumbent. Tried these.

Chainguard is well known, Wolfi based, built from source, low CVE, tooling is the best of the three, pulls into podman fine because it's just OCI. Downside was cost, the quote for the breadth we wanted was not small for a small team.

On docker hardened images its newer, minimal, SBOM and provenance attached, and being docker the distribution is pretty easy. Though the catalog felt thinner when we looked, and considering docs assume Docker, I spent an hour proving it worked headless, It did.

Minimus was the one I hadn't used. The whole catalog is free to pull with no account and could test against the customer's scanners before committing. It had FIPS and STIG tagged images the customer wants. Their stated caveat is free tier has no SLA and paid can get patches first.

None of the three fix debugging a minimal image, that's ephemeral containers or a dev variant either way. On rootless podman all worked once I stopped following the Docker flavored quickstarts. If you've run any of these headless at scale, what should I expect?

reddit.com
u/Fuzzy-Teaching7112 — 7 days ago
▲ 10 r/podman

Rebuilding a container from `podman inspect`: three fields that will break you (StopSignal, Runtime, and pod members)

I maintain a container update tool that speaks both Podman and Docker, and spent this week finding out that it has never once successfully updated a container on Podman. Not "worked badly" — never worked. Three differences between Podman's inspect output and Docker's, each fatal on its own, stacked so that fixing one only revealed the next. Writing them down because anyone reconstructing a podman run command from inspect output will hit all three, in this order.

Measured against podman 4.9.3.

1. Config.StopSignal is a number.

Podman reports 15. (Docker reports the string "SIGTERM", which is why my code assumed a string — my bug, not Podman's.) If you build your argument list from inspect output and hand it to subprocess, that integer goes straight in and Python refuses before the CLI is ever executed:

TypeError: expected str, bytes or os.PathLike object, not int

The traceback points inside subprocess, names no field, and tells you nothing about which key was wrong. Both CLIs accept the numeric form on the command line — it only ever needed to be a string.

2. HostConfig.Runtime is oci**.**

That is not the name of a runtime — it's the generic label for "whatever runtime is configured". Feed it back to podman run and:

Error: default OCI runtime "oci" not found: invalid argument

So: treat oci as "nothing to pass", and only forward a runtime somebody actually chose (crunkata). Same as Docker's runc, which I was already skipping.

3. A container in a pod looks exactly like a network-namespace sidecar.

This is the interesting one. A pod member reports:

"NetworkMode": "container:<infra-container-id>"

which is indistinguishable in shape from the Gluetun pattern — a container joined to another container's network namespace. So the obvious reconstruction is --network container:<id>, and Podman refuses:

Error: container dependency <id> is part of a pod, but container is not: invalid argument

The answer is the top-level Pod field, which carries the pod id. --pod <id> works and the container rejoins the pod properly. Nice property compared to the sidecar case: a pod can't be recreated out from under its own member, so there's no stale-id problem — which is a real headache with container:<id> when the netns owner gets replaced.

The first two hit every container on Podman, not just pod members. Which means anyone who installed my tool on Podman got a rollback every time and no successful update, ever.

The part I'd rather admit than hide: I had a test file driving a real Podman for several releases. It checked that ps worked and that the remote-connection flag was right. It never once built a run command. What was tested was the part I'd already thought about.

Fixed in Docksentry 2.6.0 if you happen to use it. But the three inspect differences are the useful part here and they're not specific to my code — if you're doing anything similar, they'll bite you in that order.

Edit: point 1 only holds on Podman 4.x — StopSignal became the signal name in 5.0.0, listed as a breaking change in the release notes. It survives in a narrower form: the Docker-compat endpoint still returns a numeric string as of v6.0.2, and an older API version still gets an int, so the field has three shapes depending on how you ask. Points 2 and 3 check out against v6.0.2 source unchanged. Also, the fix shipped in 2.4.0, not 2.6.0 as written below. Thanks to u/Great-Cow7256 for the correction.

u/Neo007-1 — 11 days ago
▲ 4 r/podman

Network Isolation

Very confused on what should and should not be possible when running rootless.

I have the following compose file.

########################
services:  
  ca:  
    image: alpine 
    command: sleep infinity  
    networks:  
      - A  
  cb:  
    image: alpine  
    command: sleep infinity  
    networks:  
      - B  
networks:  
  A:  
    external: true  
  B:  
    external: true. 
########################

I checked and the IPs are on different networks for A and B but the CB container can ping the CA container.

Should this be possible? I am running Podman 4.9

reddit.com
u/Slow_Running — 14 days ago