I have a cluster of 3 CM4 modules connected via Ethernet (Turing Pi 2 board), all are running 64bit Raspberry Pi OS (Bullseye)
One of the CM4 has wifi (calling it host), the others don't (calling them clients). I'm sharing the connection from the Pi with WiFi to the rest of the cluster, with the following setup:
On the host:
/etc/dhcpcd.conf
[...]
interface eth0
static ip_address=192.168.4.1/24
wlan0 is configured too, with a static IP
/etc/dnsmasq.conf
interface=eth0
dhcp-range=192.168.4.8,192.168.4.250,255.255.255.0,12h
/etc/sysctl.conf
[...]
net.ipv4.ip_forward=1
[...]
/etc/rc.local
[...]
iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
[...]
[...]
means there is more in the config file but I've left the default.
I can access the clients from the host CM4, the clients are able to connect to the outside network, and the clients have a 192.168.4.xxx IP on eth0. Now I would like to be able to access the clients CM4 from the rest of my local network and not just from the host CM4, how can I manage that ?