nxdomain-attack-drop

command module
v0.0.0-...-e9c63c3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 5, 2017 License: GPL-2.0 Imports: 22 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

nxdomain-attack-drop

nxdomain-attack-drop is a program written in go using libpcap made to detect and mitigate nxdomain ddos flood attacks ( https://www.dnsknowledge.com/whatis/nxdomain-non-existent-domain-2/ ) It is tested and works on linux. It can use pcap, or be setup to read logs of isc bind format, or listen to syslog. It is a command line utility and is configurable to use a script as default drop action for the detected client ip as an argument string. Default is to drop using iptables, your own firewall drop script / command can be used. If using -pcap or -listen root privileges are needed.

TODO
  • Fix mutex locks for update of go 1.8 > (will panic with newer versions of go)
  • Look at what happened to ncurses updates in menu windows

Install on linux

  1. install Go 1.8 or later
  2. git clone
  3. enter the directory
  4. install dependencies for building libpcap-devel, libpcap-devel, ncurses-devel
  5. install dependencies where packet should run libpcap, libpcap, ncurses
  6. go get
  7. go build

Usage

Usage of ./nxdomain-attack-drop: -block string firewall drop command to issue when blocking hosts (only one '%%%s' substitution allowed) (default "/sbin/iptables -A INPUT -s %s -p udp --dport 53 -j DROP") -cores int Nr of cores to utilize (default 4) (default 4) -listen string listen for syslog address:port -maxmem int Max memory allocation in Megabytes before we reset counters (default 1000) -ntopc int Number of top clients to watch (range of toplist) (default 30) -ntopd int Number of top domains to watch (range of toplist) (default 10) -path string path to logs -pcap string Set interface in promiscuous mode, this will capture packets on upd port 53 -statsn int How often to update stats (per n of requests) (default 300000)

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址