Git Product home page Git Product logo

herman1994 / block-shodan-stretchoid Goto Github PK

View Code? Open in Web Editor NEW

This project forked from krsmanovic/block-shodan-stretchoid

0.0 0.0 0.0 35 KB

Bash script that exports MikroTik dynamic firewall list, checks PTR and imports it back to MikroTik firewall permanent blackist if entry belongs to Shodan, Stretchoid, Shadowserver, Onyphe or similar scanning farms

License: MIT License

Shell 100.00%

block-shodan-stretchoid's Introduction

Reactive facility for collecting Shodan, Stretchoid, Shadowserver, Onyphe or similar scanning farm IP addresses

In case you have VPN server or any kind of publicly open service, I would recommend to filter as much bogus traffic as possible. I would argue that documented and undocumented service scanners fit to that category.

This is the example of reactive firewall policy that analyzes PTR records of IP addresses that end up on your stage 1 firewall address list. You can expand this to protect services behind your MikroTik router by adjusting firewall rules.

Linux box

  • Create ssh key pair (Linux <=> MikroTik)
  • Save bash file and edit connection parameters and list variables to your liking
  • Add cron job to run daily (or any interval that fits your firewall settings)

MikroTik box

  • Create new script user and ssh keys
  • Check if your firewall facility matches the bash address list parameters

Other lists are optional, but I've left them in the mikrotik-fw-example-rsc.txt file just to illustrate desired positioning of the firewall rules.

mikrotik-blacklist-result-example-rsc.txt

This is real example extracted from one of my MikroTik boxes.

block-shodan-stretchoid's People

Contributors

krsmanovic 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.