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.

ADVERTISEMENTS

How do I clear or flush the DNS cache

Fire a web-browser and type your firewall IP-address or hostname. For example:
https://192.168.2.254
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

Fig.02: Clear the DNS cache

Click on “restart” icon.

Verification

From your Linux/Unix/FreeBSD workstation type the host command:
$ host domain pfsense-firewall-ip-here
$ host www.cyberciti.biz 192.168.2.254

Sample outputs:

Using domain server:
Name: 192.168.2.254
Address: 192.168.2.254#53
Aliases: 
www.cyberciti.biz is an alias for wwwcybercitibiz-6txfakft69qxuof76e.stackpathdns.com. wwwcybercitibiz-6txfakft69qxuof76e.stackpathdns.com has address 151.139.243.17

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 SysAdmin, Linux/Unix, Open Source/DevOps topics:
CategoryList of Unix and Linux commands
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig 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

ADVERTISEMENTS
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>, <code>...</code> and <kbd>...</kbd> for code samples.