This is a custom IPS solution for OpenWRT router to block malicious IP adresses as reported by Redis server (running outside Router).
OpenWRT router listens for Redis que using Python and marks coming IP address banned by appending banip blocklist file /etc/banip/banip.blocklist
- python3
- python3-pip
- bash
- banip
- Install all OpenWRT dependencies
- Copy contents of this Git repository to router
/root/ips
- Copy
/root/ips/init_d_script
to/root/init.d/protect
service protect start
andservice protect enable
reboot
- Observe OpenWRT
logread -f
for changes. - Add IP to Redis list
router-block
cat /etc/banip/banip.blocklist
should have that IP after a few seconds