JMLX42 / cocorico

Cocorico is an open online voting platform powered by the blockchain.
https://cocorico.cc
MIT License
89 stars 21 forks source link

consistent whitelist/blacklist managing #93

Open JMLX42 opened 8 years ago

JMLX42 commented 8 years ago

The CMS makes it easy to add/remove whitelisted/blacklisted IPs. The blacklist/whitelist are managed through iptables. Other apps, such as fail2ban, will also interact with iptables.

We must make sure that the CMS is always up to date with the iptables rules. We must also make sure that /etc/fail2ban/jail.conf (especially ignoreip is always up to date with the CMS content).

JMLX42 commented 8 years ago

A possible solution for the blacklist would be to have a custom fail2ban action that would call a new /api/scripts/blacklist-ip.js script.

Reference: http://askubuntu.com/questions/435511/fail2ban-creating-a-custom-action-that-gives-parameters-to-script