Last active
May 19, 2021 18:52
-
-
Save urjitbhatia/e8110994ec1ed01dc3509301255aef7b to your computer and use it in GitHub Desktop.
easy way to continuously log dns queries
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# replace any with a specific interface you want to monitor or just use any to capture all interfaces | |
tcpdump -i any 'dst port 53' >> /var/log/dnsqueries.log | |
#### If using supervisord, use this template for setting up the program entry: | |
# [program:dnsworker] | |
# command=bash dnsquerylogger.sh | |
# autostart=true | |
# autorestart=true | |
# startsecs=1 | |
# startretries=3 | |
# user=root | |
# redirect_stderr=true | |
# stdout_logfile=/var/log/dnsquerylogger.proc.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment