Technical Tip: DNS Filter Profile Behavior with a DNS Response NXDOMAIN
| Description | This article describes how the DNS filter profile behaves depending on the DNS response received from the DNS server. |
| Scope | FortiOS. |
| Solution | DNS response codes range from 0 to 5, but the most common response codes are:
Consider the following scenario:
However, when the user does a nslookup for this domain, on the DNS logs under Log & Report -> Security Events -> DNS Query, the action=pass is seen:
date=2025-06-25 time=11:13:06 eventtime=1750875186766336394 tz="-0700" logid="1501054802" type="utm" subtype="dns" eventtype="dns-response" level="notice" vd="root" policyid=9 poluuid="eded1e8e-c158-51ed-48a2-07c142c3f52a" policytype="policy" sessionid=1121 srcip=192.168.10.43 srcport=59194 srccountry="Reserved" srcintf="port2" srcintfrole="lan" dstip=192.168.1.89 dstport=53 dstcountry="Reserved" dstintf="port1" dstintfrole="undefined" proto=17 profile="default" srcmac="0c:27:eb:da:00:00" xid=5 qname="test.lab.local" qtype="AAAA" qtypeval=28 qclass="IN" msg="Domain is monitored" action="pass" cat=90 catdesc="Newly Observed Domain" rcode=3
date=2025-06-25 time=11:10:49 eventtime=1750875049438784075 tz="-0700" logid="1501054803" type="utm" subtype="dns" eventtype="dns-response" level="warning" vd="root" policyid=9 poluuid="eded1e8e-c158-51ed-48a2-07c142c3f52a" policytype="policy" sessionid=841 srcip=192.168.10.43 srcport=64140 srccountry="Reserved" srcintf="port2" srcintfrole="lan" dstip=192.168.1.89 dstport=53 dstcountry="Reserved" dstintf="port1" dstintfrole="undefined" proto=17 profile="default" srcmac="0c:27:eb:da:00:00" xid=5 qname="test.lab.local" qtype="AAAA" qtypeval=28 qclass="IN" ipaddr="2001:cdba::3257:9652" msg="Domain belongs to a denied category in policy" action="redirect" cat=90 catdesc="Newly Observed Domain" Since there is no rcode=3 and the DNS response contains a DNS record, the FortiGate modifies the DNS response with the redirect portal.
|



