Score:0

How to find local DNS attackers on Linux machine?

cn flag

On a shared hosting server (centos8), thousands of websites are hosted. They all use single DNS service running as local recursive resolver (BIND 9).

We observe random overload events with no clear culprit.

One hypothesis is that some website (unix user) is attacking local DNS resolver.

In the context of locally running bind daemon, what is the best way to make it log not only the DNS query, but also the unix user that sent it? Is it even possible?

Nikita Kipriyanov avatar
za flag
Via BIND logs, no. The best it'll log is source port number, which is useless. Better try to use *audit* subsystem to record who was creating sockets. Start looking here: https://unix.stackexchange.com/questions/30046/logging-outgoing-connections-as-they-happen
cn flag
@NikitaKipriyanov thanks, I'll try that.
Score:0
in flag

You might look into running DNStop on your recursive box. It will clearly identify if you have clients abusing your service in a glance. Can be easier than observing logs, especially if you are taking a significant amount of traffic.

You should be able to find DNStop in the EPEL repositories and install with ease.

more information on this nifty tool can be found here: http://dns.measurement-factory.com/tools/dnstop/

cn flag
Unfortunately, this seems to be able to show only IP address of the source, not the unix user id. In my situation, the resolver runs on the same machine as the DNS clients do.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.