Hi,
Sorry for the delay in response. I have a lot going on at the moment.
Yes it would be perfectly possible to use host files instead of running a DNS server, or even specify IP addresses. I had a few reasons for wanting to run a DHCP server on the cluster controller.
1. I would have to maintain of host files (1 on controller, 4x1 on each Pi Zero, and 1 my laptop when I connect it to the access point.)
2. It would be tricky for my laptop as I connect it to different networks and I would have to keep swapping out host files
3. I want to take my cluster hat to hack sessions and work with other developers who may want to connect to the access point. It would be nicer to demo it to them without getting them to setup hosts files
4. I want to be learning how to use Docker, Docker Swarm, Ansible, having my own Docker Repo, maybe Kubernetes. I would like my environment as ‘real’ as possible and especially with the networking parts not having a DNS server with host names setup may complicate things.
Also this whole thing is a learning project for me so I wanted to learn how to setup my own DNS server. Now I have it working I am thinking of using what learnt to somehow replace my ISP router’s DNS server because one I create myself might be more maintainable.
Robert
-A POSTROUTING -s 192.168.0.0/24 -o eth0 -j MASQUERADE
-A POSTROUTING -s 192.168.1.0/24 -o wlan0 -j MASQUERADE
I think for wlan you also need to use ARP masquerading (hence my
question on whether it is wired or wlan). I've done this using
parprouted https://wiki.debian.org/BridgeNetworkConnectionsProxyArp.