Protect Hosts File

Lock the Windows hosts file so malware cannot hijack DNS mappings — historically via Avira Firewall, after immunizing known bad domains.

Malware sometimes rewrites the hosts file to redirect you to malicious sites or to cut you off from update and security vendors. Locking the hosts file makes unauthorized edits harder.

This note was written when Avira Premium Security Suite could lock the hosts file from its firewall settings. Product UIs change; the idea remains: immunize known malware domains first, then prevent silent rewrites.

Before you lock

  1. Review how the hosts file works.
  2. Immunize by blocking known malware domains (for example with a hosts manager such as HostsMan).
  3. Then lock the file. Unlock periodically if you want to refresh blocked domains (weekly or monthly).

Locking with Avira (historical steps)

Assuming you have Avira Premium Security Suite:

  1. Open Avira and open the configuration window.
  2. Go to [+] Firewall → Settings → click Lock now (see the image above) → Apply → OK.

If you no longer use Avira, look for an equivalent “protect hosts file” option in your security suite, or set the hosts file read-only after editing it carefully as an administrator. Keep a real antivirus in the mix either way.

Search