Adding cache-size=[cache size] to dnsmasq?



  • System - PFSense 2.0 64bit
    I can't get dnsmasq to run from the gui whenever i add "cache-size=2000" to any config files (including to the gui). Here are my testing results.

    Input = Services > DNS Forwarder > Advanced > input "cache-size=2000" > Save
    Output = The changes have been applied successfully / Status > Services > dnsmasq=Stopped
    
    Input = Services > DNS Forwarder > Advanced > input another valid option like "addn-hosts=/usr/local/etc/dlhosts" > Save
    Output = The changes have been applied successfully / Status > Services > dnsmasq=Running
    
    Input = Services > DNS Forwarder > Advanced > input another invalid option like "invalid-option=yes" > Save
    Output = The following input errors were detected: Invalid custom options / Status > Services > dnsmasq=Stopped
    
    Input = vi /usr/local/etc/dnsmasq.conf > input "cache-size=2000"
    killall dnsmasq
    dnsmasq
    Output = Status > Services > dnsmasq=Running
    
    Input = vi /usr/local/etc/dnsmasq.conf > input "cache-size=2000"
    Status > Services > Restart dnsmasq
    Output = Status > Services > dnsmasq=Stopped
    
    Input = vi /usr/local/etc/dnsmasq.conf > input another valid option such as "addn-hosts=/usr/local/etc/dlhosts"
    Status > Services > Restart dnsmasq
    Output = Status > Services > dnsmasq=Running
    
    Input = killall dnsmasq
    dnsmasq --cache-size=2000
    Output = Status > Services > dnsmasq=Running
    

    So basically..
    *If I ever add the option "cache-size=[cache size]" to a config file, such as "/usr/local/etc/dnsmasq.conf" or to the Advanced box under Services > DNS Forwarder I cannot have the PFSense gui start dnsmasq.
    *I can put other valid options on these two config area and dnsmasq starts just fine from the gui.
    *I can also start dnsmasq from an SSH session with the "cache-size=[cache size]" option either in a config file or by just appending the "dnsmasq" command.

    Can anyone point me in the right direction to be ble to add the "cache-size=[cache size]" options to dnsmasq (preferabliy in the gui)?
    Thanks



  • checked on pfsense console,
    ps -A | grep dns

    found following
    /usr/local/sbin/dnsmasq –local-ttl 1 --all-servers --rebind-localhost-ok --stop-dns-rebind --dns-forward-max=5000 --cache-size=10000

    seems current cache max is 10000


Log in to reply