Share DDEV site on local network with dnsmasq

How to access ddev sites from another device on your network.

DDEV has docs on sharing your site: https://docs.ddev.com/en/stable/users/topics/sharing/

I quickly hit the limit with the free ngrok account and decided to set up my own network with dnsmasq.

Dnsmasq is a DNS server, which allows me to route hostnames to specific IP addresses on the network.

You can check ddev describe for the port, and use that with the local network ip to access another computer. However, this doesn't work well for accessing multisites.

DDEV Settings

bind_all_interfaces: true
Binds ddev virtual network interfaces to 0.0.0.0, which allows them to be accessed via the local network.
Otherwise it will only be on 127.0.0.1, your own computer.
This is all you need to access the site via IP and ddev's external web port (use ddev describe to check).
IE: https://192.168.1.140:33128

use_dns_when_possible: true
Resolve hostnames via DNS.
Setting to false will add ddev hostnames to /etc/hosts, for offline use.

DNSMASQ Settings

domain-needed: On
Don't forward the lookup for TLD only (.com, .infonet)?

bogus-priv: On
Non routed address spaces.
Does this only route things defined here? In address?

strict-order: Off
Allow dnsmasq to pick the fastest DNS server.

no-resolv: Off
Read /etc/resolv.conf.
Contains DNS servers configured in router for DHCP.

server:
1.1.1.1
8.8.8.8
DNS servers.

local: /infonet/
Don't lookup this domain.

expand-hosts: On
Use network machine hostnames in /etc/hosts as host.infonet (using local setting).

address: <none>

listen-address: ::1,127.0.0.1,192.168.1.100
Interfaces to listen on.

no-dhcp-interface: Off
Serve DNS only?
Should I enable this?

bind-interfaces: Off
Only operate on above interfaces.
The comment says it's not needed.

domain: infonet
Used with expand-hosts, adds .infonet to hostnames in /etc/hosts.

cache-size: 1500

bogus-nxdomain: Need more info on these.

localmx: local mx record
Is this for mail?