On Tue, 06 Aug 2024 at 13:11:46 -0300, David Bremner wrote: > Could not connect to 10.0.2.2:3142 (10.0.2.2). - connect (101: Network is > unreachable) > > WORKAROUND: > > Both --apt-proxy=DIRECT and --apt-proxy=http://192.168.122.1:3142 > > allow a-b-podman to complete (libvirt is installed and configured on > this machine).
I think these are the key facts here. Your apt proxy on the host system is probably set to http://127.0.0.1:3142? The bug is that a-b-podman auto-detects this, and tries to use the same proxy inside the container; but the host system's 127.0.0.1 will not be reachable from inside the container, so it tries to translate it to an IP address at which the host will be reachable. Older versions of podman always did their networking via slirp4netns, which by default makes the host system reachable at 10.0.2.2. Newer versions of podman can either use slirp4netns or passt, defaulting to passt, which does not have that same behaviour. I don't know whether it has a *different* address for the host, but in any case there is probably no good way to detect which one podman is going to be using. Probably the only solution to this is for a-b-podman to refuse to use an auto-detected proxy if it's 127.0.0.1 (behave as if DIRECT), and instead log a warning that recommends using the --apt-proxy option. smcv

