Log DNS query to syslog on EdgeRouter

1. Update DNS Options:
configure
set service dns forwarding options 'log-queries'
commit
save

2. Create new file ‘/etc/rsyslog.d/dnsmasq.conf’
$ModLoad imfile
$InputFileName /var/log/dnsmasq.log
$InputFileTag EdgeDNS
$InputFileStateFile EdgeDNS1
$InputFileSeverity notice
$InputFileFacility local1
$InputFilePersistStateInterval 1000
$InputRunFileMonitor
*.* <@SYSLOG_SERVER_HOST_NAME OR @@SERVER_IP_ADDRES

3. restart dnsmasq and rsyslog service
sudo service dnsmasq restart
sudo service rsyslog restart

办法来自 https://community.ubnt.com/t5/EdgeRouter/Log-DNS-query-to-syslog/m-p/2267821#M199787

发表评论

电子邮件地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据