How to flush DNS cache from the CLI


  • I know this has to be easy, but I can't figure it out. I have a firewall rule that relies on a DDNS address which works just fine if I have time to let the TTL expire. Occasionally, I have a situation where the DDNS address changes and I need to be able to immediately access something. I do have an out of band secured connection that allows me to ssh into the pfsense firewall, but how do I then flush the dns cache from the CLI? There are instructions on how to do it via the web interface, but that isn't an option here.

    I'm positive it's a cache issue because if I do an nslookup on the dns name, it shows the old DDNS address, but if I then append the authoritative nameserver to nslookup it finds the correct and current address.

    TIA