Skip to content

Instantly share code, notes, and snippets.

@corporatepiyush
Last active August 15, 2023 07:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save corporatepiyush/7ebc13a355f70a8b9617488e86c174d1 to your computer and use it in GitHub Desktop.
Save corporatepiyush/7ebc13a355f70a8b9617488e86c174d1 to your computer and use it in GitHub Desktop.
Block ads and malware for MacOS
# Protection from Malicious Domain (ads, malware, hack scripts, fakenews and gambling ) for MacOS.
# You may not be doing it but various apps installed on your system doing it internally, so having ad blocker in Browser does not helps.
# Execute below command in your terminal once every week.
sudo chmod 774 /private/etc/hosts
curl https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn/hosts > hosts
sudo mv hosts /private/etc/hosts
sudo chmod 644 /private/etc/hosts
# Protection from Malicious Domain (ads, malware, hack scripts, fakenews and gambling ) for Linux servers in cloud. This is much restricitve than MacOS version
# Execute below command in your terminal once every week.
sudo chmod 774 /private/etc/hosts
curl https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts > hosts
sudo mv hosts /private/etc/hosts
sudo chmod 644 /private/etc/hosts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment