DNS Blocking and Filtering Malware, Spam, Adult Content

DNS Filtering – Malware, Spam, and Adult Content Blocking

This guide provides the official Cloudflare DNS settings for blocking malware, spam, porn, and other adult content.

Suitable for IT, network administrators, and cybersecurity teams.


1️⃣ DNS Filtering for IPv4

Malware Blocking Only

  • Primary DNS: 1.1.1.2

  • Secondary DNS: 1.0.0.2

Malware + Adult Content Blocking

  • Primary DNS: 1.1.1.3

  • Secondary DNS: 1.0.0.3


2️⃣ DNS Filtering for IPv6

Malware Blocking Only

  • Primary DNS: 2606:4700:4700::1112

  • Secondary DNS: 2606:4700:4700::1002

Malware + Adult Content Blocking

  • Primary DNS: 2606:4700:4700::1113

  • Secondary DNS: 2606:4700:4700::1003


Notes & Best Practices

  • Ensure devices are set to use the correct DNS for desired filtering

  • Consider network-wide configuration via router for consistent enforcement

  • Regularly verify DNS settings to prevent accidental bypass

  • Combine with endpoint security for layered protection


Summary

  • Cloudflare provides free DNS-based filtering for malware, spam, and adult content

  • IPv4 and IPv6 DNS addresses are provided separately

  • Configure primary and secondary DNS according to the desired level of filtering