A DNS firewall is a tool that protects DNS servers and enhances their performance. During a DoS or DDoS attack, the DNS firewall can provide rate-limiting services to stop attackers from overwhelming a server. In case of downtime due to an attack, it can keep the website or service running by serving DNS responses from the cache.