Proxy a VM within a VM

So I have a Incus VM, and inside that VM I installed incus and created a basic incus installation using the dir storage driver and an incus bridge. I created a Windows VM and I would like for educational purposes to also add a container alongside the the Windows VM that acts as a proxy server (whether its squid proxy or whatever) . Currently both the Windows VM and the additional container are using the default incus bridge (from the installation) like in the picture depicted below.

I would like to have the Windows VM go through the proxy container for WAN like so …

Is there a simple way to do this with incus without getting to messy with the settings? I know that if windows is not on the same network then it cant communicate with the other container (im trying to stay away from complicating the outer VM networking) , should i set ACL rules? Or could someone advise on a different approach?

You can define an empty L2 network with ipv4.address=none and ipv6.address=none, then connect your Windows VM to that. For the proxy container, you give it two interfaces, one on incubr0 and one on the empty L2 network, then either run a DHCP server in the container to provide an IP to Windows, or configure them both with static addresses.

@stgraber Would it be wrong to just attach this acl to the vm(10.184.222.15) , then install squid proxy on the container with the ip of 10.184.222.44 ?

Nope, that’s fine. Note that you shouldn’t even need DNS so long as DNS isn’t required to reach the proxy server. The proxy request itself includes the name, so the proxy server is the one doing the resolving.

oh really ? I was unable to resolve any dns … I wonder if my squid conf was wrong?

nevermind, it works! Thank you @stgraber !