SWAG: Proxy pass to an external (to swag) machine from LAN is not working

hi there, i have a problem with swag when I try to proxy pass to another machine in LAN. Long story short, I use swag for quite a while (like 2-3 years) and until now the biggest hackle was to make it work with NextCloud AIO, but I somehow manage it. I did not fully documented but this is when I have enabled the network_mode: "host" or maybe when I was trying to set up pi.hole… I do not remember. The idea is that my actual setup of swag in docker compose looks like this:

services:
  swag:
    image: lscr.io/linuxserver/swag:latest         
    container_name: swag
    cap_add:
      - NET_ADMIN
    environment:
      - PUID=1000
      - PGID=100  #Open Media Vault (Debian) as host, therefore 100
      - TZ=Europe/Vienna 
      - URL=mydomain.url #insert your domain name - yourdomain.url
      - EXTRA_DOMAINS=test.mydomain.url,somethingelse.mydomain.url #multiple subdomains here, not mentioned for simplicity
      - VALIDATION=http
      - EMAIL=myemail@mydomain.url
    volumes:
      - /path/to/my/swag/volume:/config  
    network_mode: "host"
    restart: unless-stopped
    extra_hosts:
      - "host.docker.internal:host-gateway"

This is all hosted on my home server with the IP 192.168.1.2. All my services are proxy-passed using this IP. For example somethingelse.mydomain.url has proxy_pass http://192.168.1.2:90; in his proxy-conf and is working. This is working for all the dockers hosted on the 192.168.1.2 machine

Now I want to proxy pass to another machine in my LAN, let’s say 192.168.1.3 which is a VM on the 192.168.1.2 but has his own IP in my LAN. The proxy-conf file is looking like this:

server {
    listen 443 ssl;
    listen [::]:443 ssl;
    http2 on;

    server_name test.*;

    include /config/nginx/ssl.conf;

    client_max_body_size 0;

    location / {
        include /config/nginx/proxy.conf;
        include /config/nginx/resolver.conf;
        proxy_pass http://192.168.1.3;
    }
}

When I change the proxy_pass to 192.168.1.2 all is fine. When the proxy_pass has something else than 192.168.1.2 is no-no! Tried also with 192.168.1.4 which is my pi.hole in order to be sure that this is the pattern. Again no-no.

What am I missing here?

Thanks!

I found the culprit! The machine that I wanted to reach was a VM on the same machine as where the swag was installed and the network interface was not correctly configured: there was no communication possible between the host and the VM!

Linuxserver Discord pointed me in the right direction! Here is the clarification on openmediavault forum: ping vm through omv and viceversa? KVM plugin - General - openmediavault and here is how this should be solved: omv6:omv6_plugins:kvm [omv-extras.org]