0

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

-run:

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

1
  • Use: chflags -R nouchg /etc/hosts
    – Cyborg
    Dec 18 '20 at 16:30

You must log in to answer this question.

Browse other questions tagged .