Return server address to localhost rather than the IP of RPI

I would like the pihole to return the blocked websites to 127.0.0.1, not the IP of RPI. I've set "IPV4_ADDRESS=127.0.0.1" in file setupVars.conf. But it does not work. Any idea on that? Thanks.

What do you want to achieve? All connected machines will try to connect to themselves which might be causing a number of problems.

Note that you have to update the lists using sudo pihole -g if you change the addresses in setupVars.conf.

I think everytime the client has to turn to the IP of the RPI for a blocked website will consumes unecessary resources/bandwidth. Good for the client to access itself in this case.

MrD, I tried "sudo pihole -g", it works on our ubuntu VPS, but not for the RPI. anything else I need to take care. Thanks.

The resource usage for redirecting to the Pi-hole is very minimal, certainly less than that actual ad would have consumed. The Pi-hole simply returns a blank HTML page for most requests, and returns a block page if it detects you went directly to the blocked site. It's not recommended to redirect requests to localhost.

1 Like