config dnsfilter profile
edit "filter_users"
config ftgd-dns
config filters
edit 1
set category 83
set action block
next
edit 2
set category 5
set action block
next
edit 3
set category 1
set action block
next
edit 4
set category 6
set action block
next
… truncated …
edit 29
next
end
end
next
end
config firewall policy
edit 1
set srcintf "lan"
set dstintf "wan1"
set srcaddr "LAN"
set dstaddr "myDNS1" "myDNS2"
set action accept
set schedule "always"
set service "DNS"
set utm-status enable
set dnsfilter-profile "filter_users"
set profile-protocol-options "default"
set nat enable
next
edit 2
set srcintf "lan"
set dstintf "wan1"
set srcaddr "LAN"
set dstaddr "all"
set action accept
set schedule "always"
set service "HTTP" "HTTPS"
set nat enable
next
end
diag debug enable
diag debug application dnsproxy -1
diag debug reset
diag debug disable
Related Articles
Technical Note: How to configure DNS based FortiGuard web filtering
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.