I want to prevent myself from modifying the hosts file. I tried to do what was answered here: Protect hosts file , which was:
-disable sip by booting into recovery mode and reboot
chflags restricted /etc/hosts
-enable sip by booting into recovery mode and reboot
However, I can still replace the hosts file with a modified version. Is there a way to completely lock down the file where it can only be modified or removed or replaced after sip is turned off?
M1 Macbook running Big Sur