ban2bgp ==================== ## Description This is a network distributed intrusion prevention system controlled via HTTP API. When bad guys tries to knock your servers or routers, their IP can be immediately blocked for specified amount of time for all your network by two ways: 1. bad IP's announced as as hotroutes to null to your RR's, so bad guys will not got responses. 2. bad IP's announced as flowspec rules, blocking any traffic from these addresses. Please be caution with attack sources, because some session-less protocols like DNS is not recommended as attack source, because source IP's can be easy spoofed. ## Quick start At first you will need at least a BGP RR to connect ban2bgp with :-). And some PC with Linux/FreeBSD (although Windows or Mac will work too, I hope) to run ban2bgp. At second you should configure your router to accept bgp connections from your PC. For example, router you have has IP 10.0.0.1, AS 65535. PC with ban2bgp has IP 10.1.1.1. In Cisco dialect it will be something like: ``` ! Set nexthop for denied routes to null ip route 198.18.0.1 255.255.255.255 Null0 ! Set up the BGP router bgp 65535 ! create a neighbor with your own AS, so it will be IBGP neighbor 10.1.1.1 remote-as 65535 ! specify source IP neighbor 10.1.1.1 update-source Loopback0 ! do not attempt to connect from router to PC, only from PC to router neighbor 10.1.1.1 transport connection-mode passive address-family ipv4 ! it has ipv4 unicast address family neighbor 10.1.1.1 activate ! send all routing information to PC neighbor 10.1.1.1 route-reflector-client ``` Now on PC with Linux or FreeBSD: ``` $ git clone https://github.com/wladwm/ban2bgp ... git messages $ cd ban2bgp $ cargo build ... cargo messages $ cat > ban2bgp.ini <