How to connect a guest network to a host network in VirtualBox 7.0?

I want my host to be able to connect to the Internet for web pages, etc, and I want to be able to connect to a (PHP: php -S 0.0.0.0:8080 -t /route/to/html ) development web server on the guest from any device connecting via the same router — eg the host computer, my mobile phone, my tablet, …

On my old system — Ubuntu 18.04 host, Lubuntu 18.04 guest, and VirtualBox 4.? — networking was easy: just have one VirtualBox network adapter set to bridged and everything worked. Indeed, some of the answers (with several upvotes) to this general problem say to do exactly that.

Now with VirtualBox 7.0, Ubuntu 24.04 host, Lubuntu 24.04 guest. Plus new router, so it might be a setting in there, but where to look and what to set? I’m using hostname -I or ifconfig to discover IP addresses.

Router is 192.168.1.1, host is 192.168.1.189.

  • One adapter set to NAT (the default setting): Guest is 10.0.2.15, can connect to web, but it’s web server is inaccessible from host or anything else on the 192.168... network.
  • One adapter set to bridged: Guest loses IPv4 address, but seems to have IPv6 (?), can’t connect to web pages.
  • Adapter 1 set to NAT, Adapter 2 set to bridged: Same as for one NAT adapter. After a few seconds, guest reports connection to second wired connection lost.
  • One adapter set to NAT and port forwarding: No idea how to set the port forwarding ‘rules’, I’ve tried some stuff and it didn’t work.