IBM Security MaaS360

 View Only

Preventing browser access to TikTok on macOS Devices

By Chuck Brown posted Fri March 24, 2023 11:29 AM


We have discussed in different blog entries in the Security Community regarding what MaaS360 can do to remove TikTok from devices and prevent its usage, but that centered on the TikTok application.

But how can we prevent a person from accessing on a macOS device using any browser?

Individual browser blocklist configuration values on macOS and Windows can prevent access but that’s a lot of work.  You can’t even depend on those configuration variables because someone may have a different browser that we may not have known about.

We need to look at blocking at a macro level.

A straightforward way to make this happens is to update the host file on your macOS machine.


Here are the steps:

1.       Open the text editor of your choice.

2.       Create a SH file containing some of the example code

a.       Choose from the examples

3.       Open File Explorer

4.       Replace the host file

The TikTok URL will no long be accessible from a Windows based Browser

Example 1


echo ' localhost' >> /etc/hosts

echo ' localhost' >> /etc/hosts

Example 2

echo " localhost `hostname`">./temp_hosts

echo "">>./temp_hosts

echo "">>./temp_hosts

cat /etc/hosts |tail -n +2 >>./temp_hosts

cat ./temp_hosts > /etc/hosts

rm ./temp_file

Distribution of Shell Script with MaaS360


Create a group for Mac Devices

Execute you host shell script.

Upload and distribute