How to clear DNS cache on DD-WRT

According to Flush dnsmasq dns cache:

dnsmasq is a lightweight DNS, TFTP and DHCP server. It is intended to provide coupled DNS and DHCP service to a LAN. Dnsmasq accepts DNS queries and either answers them from a small, local, cache or forwards them to a real, recursive, DNS server. This software is also installed many cheap routers to cache dns queries. Just restart to flush out dns cache:

# stopservice dnsmasq
# startservice dnsmasq

killall -1 dnsmasq

Send HUP signal to tell it flush the cache an reread its configuration, thus starting over with a clean slate.


Since there are no init scripts on DD-WRT, I guess this would be the easiest way to restart dnsmasq:

  1. Kill dnsmasq:

    root@ddwrt6:~# killall dnsmasq
    
  2. Start dnsmasq:

    root@ddwrt6:~# dnsmasq --conf-file=/tmp/dnsmasq.conf