Hello, whatever I do OpenWrt does not advertise my DNS server (a Pi-hole actually) for DHCP clients. Here is my /etc/config/dhcp
config dnsmasq
option readethers '1'
option leasefile '/tmp/dhcp.leases'
option domain 'local'
option local 'local'
option logqueries '1'
option sequential_ip '1'
option localservice '0'
option boguspriv '0'
option authoritative '1'
option nonwildcard '1'
option rebind_protection '1'
list interface 'lan0'
option allservers '1'
list server '192.168.0.2'
list server 'fd31:8ee3:937c:1:ba27:ebff:fe20:51a3'
config dhcp 'lan'
option interface 'lan'
option ra_slaac '1'
list ra_flags 'managed-config'
list ra_flags 'other-config'
option force '1'
option dhcpv4 'server'
option start '10'
option leasetime '24h'
option limit '240'
option ra 'server'
option ra_default '1'
list dhcp_option '6,192.168.0.2'
config dhcp 'wan'
option interface 'wan'
option ignore '1'
config odhcpd 'odhcpd'
option leasefile '/tmp/hosts/odhcpd'
option leasetrigger '/usr/sbin/odhcpd-update'
option loglevel '4'
option maindhcp '1'
And this is the /etc/config/network
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix '*****************::/48'
config interface 'lan'
option type 'bridge'
option ifname 'eth1'
option proto 'static'
option netmask '255.255.255.0'
option force_link '0'
option ipaddr '192.168.0.1'
option ip6assign '64'
option ip6hint '1'
list dns '192.168.0.2'
config interface 'wan'
option ifname 'eth0'
option proto 'dhcp'
option peerdns '0'
config interface 'WAN6'
option ifname 'eth0'
option proto '6in4'
option username '********************'
option peeraddr '**************************'
option password '*****************'
option tunnelid '************'
list ip6prefix '*******************::/64'
option ipaddr '*******************'
option ip6addr '****************************::2/64'
option mtu '1480'
I am a bit confused about the multiple locations for setting DNS. Should I use dhcp-opkg instead? My goal is to give IP address for clients on the LAN and tell them to use 192.168.0.2 as DNS server.
Whatever I do they use the LAN IP address 192.168.0.1 as DNS server.
I alredy tried rebooting the OpenWRT and rebooting the clients, but no avail.
Thanks for any advice.