FastNetMon community CLI and API

It’s very-very early developer preview feature but you may try it. You need to install FastNetMon using custom flags unless if you’ve installed GoBGP support then you have got API support automatically.

wget https://raw.githubusercontent.com/pavel-odintsov/fastnetmon/master/src/fastnetmon_install.pl -Ofastnetmon_install.pl
sudo perl fastnetmon_install.pl --use-git-master --api

Enable API in configuration file /etc/fastnetmon.conf:

enable_api = on

You could ban IP this way:

/opt/fastnetmon/fastnetmon_api_client ban

You could unban IP this way:

/opt/fastnetmon/fastnetmon_api_client unban

You could check list of blocked hosts this way:

/opt/fastnetmon/fastnetmon_api_client get_banlist

Sample output: