Skip to main content

Counting Denied Queriers

(2016-05-09)

Problem

Show IPs getting denied responses to queries on my local DNS server, sorted by the number of denies in the log file.

Solution

# grep denied named.log.1 | awk '{print $4}' | awk -F '#' '{print $1}' | sort | uniq -c | sort -n | less

Commentary

There's nothing here to be proud of, but it works.