Bash script to ban IP on Livebox internet box (from Orange french ISP)
Same support than sysbus. Tested only with livebox 4.
- Install
jq
command from package- Debian / Ubuntu
sudo apt-get update sudo apt-get install jq
- RedHat / Centos / Fedora
sudo yum install jq
- Debian / Ubuntu
- Install
sysbus
command from GitHub project (see sysbus README)sudo pip3 install sysbus
- Copy
livebox-banip
in a folder of your$PATH
variable (ex:/usr/local/bin
) - Configure
sysbus
(see sysbus README)sysbus -config -password SECRET [ -url http://192.168.1.1/ ] [ -lversion lb4 ]
- Test installation:
livebox-banip -l && echo OK || echo ERROR
Usage: livebox-banip [OPTIONS] --list|-l
or: livebox-banip [OPTIONS] --add <IP>
or: livebox-banip [OPTIONS] --remove <IP>
or: livebox-banip [OPTIONS] --help|-h
List, add or remove IP address to livebox ban list
--add=<IP> add <IP> to ban list
--destination ban or list ban flow from local network to <IP>
-h, --help display this help and exit
-l, --list list all ban ip
--remove=<IP> remove <IP> from ban list
--source ban or list ban flow from <IP> to local network (default)
-v, --verbose Verbose mode. Multiple -v options increase the verbosity.
The maximum is 2.
level 1: output API result json
level 2: output jq/sysbus params
<IP>
could be:
- A fixed IPv4 (ex: 192.168.0.32)
- An IPv4 subnet mask in format: IP/CIDR (ex: 192.168.0.0/24)
For now only IP v4 is supported.