Resetting the Hosts File

ActivTrak allows administrators to block websites they do not want users accessing.  

 

Screen_Shot_2020-01-23_at_5.25.59_PM.png

 

In order to do this, we make changes to the host file saved on every Mac and PC and use a routing service for the Chrome agent.

Some Anti-Virus agents will prevent ActivTrak from writing to these host files as that can potentially be a security vulnerability. While whitelisting ActivTrak (steps to do this can be found here: https://bit.ly/2RoqugB) will prevent this in most scenarios, it may be necessary to manually remove any blocked websites from this file if your Anti-Virus is preventing the agent from writing to the hosts file.

 

PC

 

On PCs the hosts file can be found in C:\windows\system32\drives\etc.Screen_Shot_2020-01-28_at_1.37.39_PM.png

 

if we open the hosts file, we'll see the following:

 

Screen_Shot_2020-01-28_at_1.38.18_PM.png

Everything in between "Begin ActivTrak" and "End ActivTrak" are domains that have been added to the block list on app.activtrak.com and will be blocked by the agent.

 

Per Microsoft, these are the steps for resetting the hosts file back to default:

 

  1. Open Notepad. To do this, search for “Notepad” using Cortana, and then tap or click the Notepad icon.

  2. Copy the following text, and then paste the text into the file:
    # Copyright (c) 1993-2006 Microsoft Corp.
    #
    # This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
    #
    # This file contains the mappings of IP addresses to host names. Each
    # entry should be kept on an individual line. The IP address should
    # be placed in the first column followed by the corresponding host name.
    # The IP address and the host name should be separated by at least one
    # space.
    #
    # Additionally, comments (such as these) may be inserted on individual
    # lines or following the machine name denoted by a '#' symbol.
    #
    # For example:
    #
    #      102.54.94.97     rhino.acme.com          # source server
    #       38.25.63.10     x.acme.com              # x client host
    # localhost name resolution is handle within DNS itself.
    #       127.0.0.1       localhost
    #       ::1             localhost 
  3. On the File menu, select Save as, type "hosts" in the File name box (as displayed in the following image), and then save the file to the desktop.
    Screenshot showing how to save the
  1. Close Notepad.

  2. Search for %WinDir%\System32\Drivers\Etc using Cortana, and then select the File folder icon.

  3. Tap and hold or right-click the Hosts file, select Rename, and then rename the file as "Hosts.old".

  4. Copy or move the Hosts file that you created in step 3 from the desktop to the %WinDir%\System32\Drivers\Etc folder. If you are prompted to enter an administrator password, select Continue.

 

Mac

 

To modify the hosts file on a Mac, we will need to use Terminal.

 

We'll start by entering sudo nano /etc/hosts and entering the admin password when prompted.

Note: When entering your password in terminal, you will not see the characters appear inside Terminal.

Screen_Shot_2020-01-28_at_1.49.11_PM.png

 

 The highlighted section shows the domains currently being blocked by ActivTrak. 

 

Screen_Shot_2020-01-28_at_2.54.08_PM.png

Next, move the cursor (using the arrow keys) to the lines we want to remove.  

 

Screen_Shot_2020-01-28_at_3.02.06_PM.png 

Press Control + K and that line will be removed. Repeat for each desired deletion.

After this is completed, press Control+X and you will be prompted if you want to save your changes.

 

Screen_Shot_2020-01-28_at_3.02.40_PM.png

 

Enter "Y" for yes and the hosts file with be modified to reflect those changes.

Chrome 

The Chrome Agent is the easiest to reset the hosts file for. 

Simply open your Chrome browser and navigate to chrome://extensions and locate the ActivTrak extension, then click on "Remove".

 

Screen_Shot_2020-01-28_at_3.21.22_PM.png

 

 

 

 

Was this article helpful?
0 out of 0 found this helpful

Tony Wurst
Comments

To view or create a ticket, please login to ActivTrak

Log in