How to flush/clear the pfsense DNS forwarder cache

I am using the pfSense based firewall. How do I clear the unbound DNS forwarder cache when using the pfSense firewall?

Your firewall comes with Unbound DNS caching system. It is a very secure validating, recursive, and caching DNS server. This tutorial shows you how to clear the Unbound DNS forwarder cache, restart the Unbound daemon on pfSense.

How do I clear or flush the DNS cache

Fire a web-browser and type your firewall IP-address or hostname. For example:
Next click on the Status > Services:

Fig.01: See pfsense services

Locate unbound in the list:

Fig.02: Clear the DNS cache

Click on “restart” icon.


From your Linux/Unix/FreeBSD workstation type the host command:
$ host domain pfsense-firewall-ip-here
$ host

Sample outputs:

Using domain server:
Aliases: is an alias for has address

Please note that most modern browser may cache dns queries too. So just restart your browser too.

How do I clear/flush the MS-Windows 7/10 client DNS cache?

Open Command Prompt from the run box (Press Windows+R and type “cmd” and then click “OK”). Type the following command at C: prompt:
ipconfig /flushdns

How do I clear/flush the macOS sierra client DNS cache?

Open the terminal app and type the following two commands:
sudo dscacheutil -flushcache
sudo killall -HUP mDNSResponder

How do I clear/flush the Linux client DNS cache?

See “How To Flush Linux / UNIX DNS Cache” for more info.

Posted by: SXI ADMIN

The author is the creator of SXI LLC and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.