My aim is to have a Raspberry Pi 5 provide a Wi-Fi service to other devices and run Pi-Hole, providing internet from a router connected to the Raspberry Pi's Ethernet port as well as Pi-Hole functionality to the wired network. It is running the latest Bookworm OS and I have removed Network Manager so that Pi-Hole and dhcpcd work correctly.
I have successfully installed Pi-Hole and it is providing DNS and DHCP to the wired network with internet via the connected router.
I am now trying to configure the Wi-Fi as an access point using hostapd. Primarily using https://thepi.io/how-to-use-your-raspberry-pi-as-a-wireless-access-point/ as a guide (albeit without dnsmasq as Pi-Hole provides DNS), I have installed hostapd and it is running but not properly. Temporarily I have disabled WPA2 security so it is an open Wi-Fi network (just to remove the variable of encrypted connection).
If I try and connect from an Android phone it fails to get an IP address. If I manually define the phone's IP address then it connects although it cannot ping the Wi-Fi IP address of the Raspberry Pi and the Raspberry Pi cannot ping the IP address of the phone. The phone can ping it's own IP address.
From another PC on the wired network I can ping the Raspberry Pi Wi-Fi IP address so assume that I have the Wi-Fi to Wired ethernet bridge working correctly.
I think that the main problem would seem to be that Pi-Hole is not serving DHCP on the Wi-Fi interface.
Grateful for any guidance or further things to look at.
Key configurations are:
hostapd.conf
interface=wlan0
bridge=br0
hw_mode=g
channel=7
wmm_enabled=0
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
ssid=MySSID
dhcpcd.conf
clientid
persistent
vendorclassid
option domain_name_servers, domain_name, domain_search
option classless_static_routes
option interface_mtu
option rapid_commit
require dhcp_server_identifier
slaac private
interface eth0
static ip_address=X.Y.Z.3/24
static routers=X.Y.Z.100
static domain_name_servers=X.Y.Z.3
interface wlan0
static ip_address=X.Y.Z.101/24
nohook wpa_supplicant
denyinterfaces eth0
denyinterfaces wlan0
/etc/default/hostapd
DAEMON_CONF="/etc/hostapd/hostapd.conf"
/etc/network/interfaces
auto br0
iface br0 inet manual
bridge_ports eth0 wlan0
Removing the loopback interface, ifconfig reports:
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet X.Y.Z.3 netmask 255.255.255.0 broadcast X.Y.Z.255
inet6 fe80::6e60:decf:3a7d:94e7 prefixlen 64 scopeid 0x20<link>
ether d8:3a:dd:d0:07:ab txqueuelen 1000 (Ethernet)
RX packets 247774 bytes 16286991 (15.5 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 47900 bytes 35782048 (34.1 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 112
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet X.Y.Z.101 netmask 255.255.255.0 broadcast X.Y.Z.255
inet6 fe80::a00a:6db:158e:5d85 prefixlen 64 scopeid 0x20<link>
ether d8:3a:dd:d0:07:ac txqueuelen 1000 (Ethernet)
RX packets 4745 bytes 276045 (269.5 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 433 bytes 65965 (64.4 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
X.Y.Z is my internal IP range.