Expected Behaviour:
RPI bridge eth0 and wlan1to br0(192.168.1.1) with eth0(192.168.100.xx) connected to WAN with Pi-hole running and blocking ads
Actual Behaviour:
Fresh install with the follow command to bridge eth0 and wlan1to br0(192.168.1.1) with eth0(192.168.100.xx) connected to WAN and connected devices have access to internet
Followed by pihole installation which results in connected devices with no access to internet and the following error message appear on pihole diagnosis page
"FTL failed to start due to cannot open or create lease file
/var.lib/misc/dnsmasq.leases;Permission denied"
the following were run followed by pi-hole installation
sudo apt install hostapd
sudo systemctl unmask hostapd
sudo systemctl enable hostapd
sudo nano /etc/systemd/network/bridge-br0.netdev
[NetDev]
Name=br0
Kind=bridge
sudo nano /etc/systemd/network/br0-member-eth0.network
[Match]
Name=eth1
[Network]
Bridge=br0
sudo nano /etc/dhcpcd.conf
denyinterfaces wlan0 eth1
interface br0
static ip_address=192.168.1.1/24
nohook wpa_supplicant
sudo nano /etc/hostapd/hostapd.conf
country_code=US
interface=wlan0
bridge=br0
ssid=mynetwork
hw_mode=g
channel=7
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=password
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
sudo apt install dnsmasq
sudo DEBIAN_FRONTEND=noninteractive apt install -y netfilter-persistent iptables-persistent
sudo nano /etc/sysctl.d/routed-ap.conf
# Enable IPv4 routing
net.ipv4.ip_forward=1
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
sudo netfilter-persistent save
sudo mv /etc/dnsmasq.conf /etc/dnsmasq.conf.orig
sudo nano /etc/dnsmasq.conf
interface=br0 # Listening interface
dhcp-range=192.168.1.50,192.168.1.99,255.255.255.0,24h
domain=wlan # Local wireless DNS domain
address=/gw.wlan/192.168.1.1
After installing pihole
dnsmasq.conf is left with below code
conf-dir=/etc/dnsmasq.d
and i am unable to access even192.168.1.1/admin
after adding back my bridge setting to dnsmasq.conf, i am able to access192.168.1.1/admin
conf-dir=/etc/dnsmasq.d
interface=br0 # Listening interface
dhcp-range=192.168.1.50,192.168.1.99,255.255.255.0,24h
# Pool of IP addresses served via DHCP
domain=wlan # Local wireless DNS domain
address=/gw.wlan/192.168.1.1
# Alias for this router
i tried
sudo service dnsmasq stop
sudo service dnsmasq disable
sudo service pihole-FTL restart
which failed to work so i removed dnsmasq which gives the same result
sudo apt-get remove dnsmasq
sudo service pihole-FTL restart
i am able to ping 8.8.8.8 and 8.8.4.4
inside dnsmasq.leases there are mac addresses and IP of connected devices