I want my Pi to act as an access point on wlan0
and get an internet connection from wlan1
(or eth0
at home) while using Pi-hole for all clients on the AP.
I am using v6, however these issues also occurred on v5.
First I tried using nmcli
for the AP:
Created using: sudo nmcli device wifi hotspot ssid MySSID password MyPassword ifname wlan0
Set port=0
in /etc/NetworkManager/dnsmasq-shared.d/disable-dns.conf
to stop it from taking port 53. This resulted in the clients reviving no DNS-Server via DHCP(I also turned on Pi-holes DHCP-Server). Entering the IP of the Pi manually as DNS-Server didn't work(Servers like 1.1.1.1
did work) and the web interface was also inaccessible from the AP.
After that i tried using hostapd
:
Config:
# /etc/hostapd/hostapd.conf
interface=wlan0
driver=nl80211
ssid=YourSSID
hw_mode=g
channel=6
wmm_enabled=0
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=YourPassphrase
rsn_pairwise=CCMP
I turned on Pi-holes DHCP also for this on, as i want using the regular hostapd + dnsmasq.
For this config only the WPA-Handshake worked, but no IP was assigned and therefore no proper connection.
I am using an Raspberry Pi 5 8gb with Raspberry Pi OS(Bookworm, 6.6.62+rpt-rpi-2712) and wlan0
is the built-in WLAN module.
I am not sure to which interface Pi-hole was broadcasting DHCP as there is no option to select this. I selected wlan0
during initial setup.I connected via my home network on eth0
.
I also generated a debug log: https://tricorder.pi-hole.net/jLHcA5vF/, not sure if it helps tho.