Git Product home page Git Product logo

beardropper's Introduction

bearDropper

dropbear log parsing ban agent for OpenWRT (Chaos Calmer rewrite of dropBrute.sh) - @robzr

OpenWRT (Chaos Calmer) script for blocking repeated invalid dropbear ssh connection attempts (embedded fail2ban)

Status

Working, no known issues.

Dependencies

None! Written entirely in busybox ash, uses all standard OpenWRT commands.

Installation

To install or upgrade to the latest bearDropper, run:

wget -qO- http://rawgit.com/robzr/bearDropper/master/install.sh | sh
  • To modify the config options, edit the uci config file (/etc/config/bearDropper)
  • Use bearDropper -h to see options for runtime config (runtime options override uci config options)
  • Consider increasing your syslog ring buffer size (/etc/config/system option log_size)

Logging

  • logs to the syslog ring buffer by default (view with the logread command)
  • logs to stdout with "-f stdout" (or logFacility config option)
  • increaser verbosity with "-l 2" (or logLevel config option)

Features

  • small size, low memory footprint, no external dependencies
  • uses uci for config, overridable via command line arguments
  • uses a state database which periodically syncs to iptables (for resiliency)
  • can sync state database to persistent storage, with logic to avoid excessive flash writes
  • state database supports optional compression
  • uses highly readable BIND time syntax for all time values (ex: 9d2h3s is 9 days, 2 hours, 3 seconds)
  • runs in the background for realtime monitoring when run via included init script
  • can also be run by hand to process historical log entries
  • self installs into iptables for simple and reliable setup (easily disabled)
  • conservative input validation for security

TBD

  • Add optional freegeoip.net lookups for (de|ac)cellerated banning
  • implement whitelist
  • CIDR processing for bans & whitelists
  • self expiring ipset based ban list
  • package and submit to openwrt repo once it's reasonably bug free
  • ipv6 support

Also see the sister project sub2rbl for RBL based banning: https://github.com/robzr/sub2rbl

Discussion of these projects at OpenWRT forums: https://forum.openwrt.org/viewtopic.php?id=62084

beardropper's People

Contributors

robzr avatar ohrn avatar jschornick avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.