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

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.

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 2 comments so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersdf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
2 comments… add one
  • Raj Apr 19, 2017 @ 12:14

    How about command line option over ssh? Is it possible?

  • didi Apr 19, 2017 @ 20:36

    On Linux you can restart dnsmasq:
    service dnsmasq restart

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum