Harden my pi running pihole? (install ufw)

Yep I think you're right. We should probably allow the entire 127.0.0.0/8 subnet. Either that, or we could write a ufw rule to allow all connections to port 4711 from the loopback interface?

sudo ufw allow in on lo to any port 4711 proto tcp

This rule even works for IPV6 networks.


Speaking of that, I don't think adding IPV6 rules would be necessary for now because most home users only use IPV4 networks. Furthermore, all ufw rules that I had written previously is very specific to IPV4 networks i.e.

sudo ufw allow from 192.168.0.0/16 to any port 22 proto tcp

is IPV4 only.


I don't think we'll be able to cater to IPV6 users too all in one post cuz if we do that, this post might get so long that it deserves to be an independent wiki :rofl:

Besides, I don't have much experience with IPV6 subnet notations so I'm a newb at hardening IPV6 networks.