Settings not saved via web interface

pi@raspberrypi:~ $ echo 'www-data ALL = NOPASSWD : ALL' | sudo tee -a /etc/sudoers
www-data ALL = NOPASSWD : ALL
pi@raspberrypi:~ $ sudo -s
root@raspberrypi:/home/pi# sudo -u www-data pihole enable
::: Blocking has been enabled!
root@raspberrypi:/home/pi# exit
exit
pi@raspberrypi:~ $ sudo sed -i '$ d' /etc/sudoers
pi@raspberrypi:~ $

reboot my Pi?

Nothing fixed yet so reboot is no use.
Try run below one and after, check if fixes anything (FYI, it will add a line to the sudoers file):

echo 'www-data ALL = NOPASSWD : ALL' | sudo tee -a /etc/sudoers

If it didnt fix anything, run below one to delete that line again (undo):

sudo sed -i '$ d' /etc/sudoers

OK, so i seem to be able to make changes in adin page, aqnd they look to be saving.
but, i still see adverts in my chrome on laptop....i have not set up the DNS server manually on the laptop.
i also see adverts on android device, with no dns set manually...id like to avoid this?

i guess a solution would be to use pi-hole as dhcp server?

Setup DNS manually first on the laptop to see if works.
Below one should display the Pi-Hole admin page and if not, something is still wrong:

http://pi.hole/admin/

Ps. when you activate the DHCP services on Pi-Hole (make sure router DHCP server is disabled first) , the DHCP leases need renewal on the clients.
Either disconnect network and reconnect or reboot the clients.

thanks for your help.

if i set DNS manually on laptop, adverts seem to be blocked.

http://pi.hole/admin/ gives me a 404 error. But i have changed the port from the default 80 as it was interfering with my home assistant install...emulated hue componenet requires port 80

A little bit more work but you can configure the Pi to have two IP addresses.
So Pi-Hole can bind to the first IP address (recommended) and the other port 80 service could bind to the second IP addrerss.
Have a look at below one how its done with lighttpd and nginx (both competing for port 80):

whats the benefit of doing this method?

i simply changed the lighttpd.conf file in /etc/lighttpd

Redirected ads will hit port 80, and we can't change that. So if you set up a dedicated Pi-hole IP address, then the blocked ads will be handled by the Pi-hole instead of the hue component setup you have on port 80 right now.

a ok, so even having changed server.port = 8017 in /etc/lighttpd/lighttpd.conf ads are still sent to port 80?

Affirmative.

123456789

copy that....

and, also

what!?!

Messages should be at least 20 characters long :smiley:

awesome!

ABCDEFGHIJKL
:wink:

on a serious note, big thanks to al for helping.

Ill try the linked alias interface method

failed at the first hurdle!

pi@raspberrypi:/etc/network $ sudo nano interfaces
pi@raspberrypi:/etc/network $ sudo ifup -v eth0:0
Reading directory /etc/network/interfaces.d
/etc/network/interfaces:23: option with empty value
ifup: couldn't read interfaces file "/etc/network/interfaces"

i added

{
echo
echo 'auto eth0:0'
echo 'allow-hotplug eth0:0'
echo 'iface eth0:0 inet static'
echo '    address 10.0.0.20'
echo '    netmask 255.255.255.0'
} | sudo tee -a /etc/network/interfaces

to my /etc/network/interfaces file in this above exact format?

Noooooooooo :smiley:
Remove that again.
Copy the whole lot to a text editor first and replace network details like IP address and netmask.
After, you copy the whole lot to clipboard, and paste into SSH session + ENTER.

ignore me, just released my noob error...tee

yeah sorry, i was being uber dumb!

After the ifup command, you can check with:

ip addr show

so, i have ran through that mini guide and seem to have a second IP for my pi as seen in ip addr show

and as far as i can make out i have successfully bound lighttpd to the new IP:

pi@raspberrypi:/etc/lighttpd $ sudo netstat -nltup | grep 'Proto\|lighttpd\|dnsmasq\|dhcpcd'
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 192.168.0.32:80         0.0.0.0:*               LISTEN      10944/lighttpd
tcp        0      0 0.0.0.0:53              0.0.0.0:*               LISTEN      2922/dnsmasq
tcp6       0      0 :::53                   :::*                    LISTEN      2922/dnsmasq
udp        0      0 0.0.0.0:53              0.0.0.0:*                           2922/dnsmasq
udp        0      0 0.0.0.0:68              0.0.0.0:*                           698/dhcpcd
udp6       0      0 :::546                  :::*                                698/dhcpcd
udp6       0      0 :::53                   :::*                                2922/dnsmasq

but

adverts are still showing unless i manually set the DNS?
i also commented out the relevant part of /etc/lighttpd/lighttpd.conf for IPV6
:confused:

EDIT

I actually get adverts even if i manually set the DNS