I have just installed DietPi on my Pi2B as an alternative to Raspbian.
I want to run pihole and pivpn on there. However I have found something that DietPi is doing that stops it from working properly.
I run my network on 172.0.0.x rather than 192.168.x.x and as such DietPi won't allow me to connect to the web services (or pivpn for that matter).
I believe it is related to this: viewtopic.php?p=20968
Re: RPi 4 | pihole web interface forbidden
Post by MichaIng » Fri Dec 06, 2019 5:53 pm
Glad you found it. X-Frame-Options: DENY is just a security header which denies to add the web page as frame into another website. But the direct access is not affected by this.
Yeah we check for local IP by comparing with the pattern for reserved local IPs. Using any other IPs for local networks means that you break access to those on www, hence there is high likely a host out there that you cannot reach anymore, since you local LAN host duplicates it and takes priority probably from within local network . Always use 192.168.*/10.* or 172.[16 to 31].* for local networks, the first pattern is most common. 10.* is mostly found for VPNs, 127.* btw. is reserved/resolved as loopback to the localhost itself.
Any way to stop DietPi from doing this? I'm not sure it needs to be done and is restrictive for no real reason?