Giter VIP home page Giter VIP logo

cs-exabgp-bouncer's Introduction

cs-exabgp-bouncer

Crowdsec bouncer to be used with exabgp to blackhole IP addresses

Description

This repository is an example of how to integrate CrowdSec with Exabgp to blackhole IP to a BGP Peer within your network.

This has been tested to dynamicly blackhole prefix when the log4j vulnerability came out and prevent potential exploits.

Usage

Warning: if you use both ipv4 and both ipv6, you need to register 2 bouncers. Crowdsec use the API key to track decisions report while pulling the API

$ cscli bouncer add cs-exabgp-bouncer-ipv4
Api key for 'cs-bgp-bouncer-v4':

   b183089790450bc888dcb07e9cb13e51

Please keep this key since you will not be able to retrieve it!

You can copy this script in your /etc/exabgp/scripts/ directory and use the following configuration as an example:

process dynamic_routes_v4 {
    run python3 /etc/exabgp/script/cs-exabgp-bouncer.py -4 --api-key b183089790450bc888dcb07e9cb13e51 --next-hop 192.0.2.1;
    encoder text;
}

# ipv4 example
neighbor 192.168.0.253 {
    family {
     ipv4 unicast;
    }
    announce {
     ipv4
    }
    router-id 192.168.0.30;
    local-address 192.168.0.30;
    local-as 65001;
    peer-as 65000;

    api {
        processes [dynamic_routes_v4];
    }
}

Example

usage: cs-exabgp-bouncer.py [-h] [-6 | -4] --lapi-url LAPI_URL --api-key API_KEY --next-hop NEXT_HOP [-c COMMUNITY [COMMUNITY ...]] [-i INTERVAL]
cs-exabgp-bouncer.py: error: the following arguments are required: --lapi-url, --api-key, --next-hop

This script provide the ability to set BGP communities to your announce if your setup needs it.

cs-exabgp-bouncer's People

Contributors

solvik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cs-exabgp-bouncer's Issues

Please get in touch :-)

Hey! I am head of community at CrowdSec and just found your script today - got a tip from someone who uses it in production. So I'd like to reach out and get acquainted. Please shoot me a mail at [email protected].

Thanks a lot!

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.