# /usr/local/opnsense/mvc/app/models/OPNsense/Bind/General.xml<model> <mount>//OPNsense/bind/general</mount> ... <items> ... <syslog type="OptionField"> <Required>N</Required> <Multiple>Y</Multiple> <OptionValues> <default>default</default> # note: I've tried with and without <default> to make sure it didn't conflict <general>general</general> <queries>queries</queries> <rpz>rpz</rpz> </OptionValues> <default></default> # tried with and without this parameter, and with and without a value set </syslog> ... </items></model>
# /usr/local/opnsense/mvc/app/controllers/OPNsense/Bind/forms/general.xml<form> ... <field> <id>general.syslog</id> <label>Enable Syslog</label> <type>select_multiple</type> <help>Enable syslog per logging channel.</help> </field> ...</form>
# /usr/local/opnsense/service/templates/OPNsense/Bind/named.conf...logging { ...{% if helpers.exists('OPNsense.bind.general.syslog') %} channel syslog { syslog daemon; severity info; };{% endif %} category default { default_log; {% if 'default' in OPNsense.bind.general.syslog %}syslog;{% endif %} }; category general { default_log; {% if 'general' in OPNsense.bind.general.syslog %}syslog;{% endif %} }; category queries { query_log; {% if 'queries' in OPNsense.bind.general.syslog %}syslog;{% endif %} }; category rpz { rpz_log; {% if 'rpz' in OPNsense.bind.general.syslog %}syslog;{% endif %} }; ...};...
logging { ...{% if helpers.exists('OPNsense.bind.general.syslog') %} channel syslog { syslog daemon; severity info; };{% endif %} category default { default_log;{{ ' syslog;' if 'default' in OPNsense.bind.general.syslog|string }} }; category general { default_log;{{ ' syslog;' if 'general' in OPNsense.bind.general.syslog|string }} }; category queries { query_log;{{ ' syslog;' if 'queries' in OPNsense.bind.general.syslog|string }} }; category rpz { rpz_log;{{ ' syslog;' if 'rpz' in OPNsense.bind.general.syslog|string }} }; ...};