Nerd's firewall for server hardening. Block the ip's from the data sources and add them to the iptables block list.
- Clone the repository
[email protected]:vijaynaidu/mahakala.git
- Fetch the ips from the data sources and add them to the
data/ip-blacklist/{source}/{file-name}.txt
file. - Fetch the ips from some known sources using command
python3 fetch_blacklist_ips.py
. This will fetch the ips from the sources and add them to thedata/ip-blacklist/{source}/{file-name}.txt
file. - Navigate to the project directory and initiate python script to add the ips into block list of iptables.
python3 main.py
- Check if the ip's in the block list are added to the iptables using command
iptables -L -n --line-numbers
andip6tables -L -n --line-numbers
- https://github.com/SilvrrGIT/IP-Lists/tree/master
- https://wiki.ipfire.org/configuration/firewall/blockshodan
- https://github.com/stamparm/ipsum/tree/master
iptables -n -L MAHAKALA_BLACKLIST_INPUT --line-numbers
andip6tables -n -L MAHAKALA_BLACKLIST_INPUT --line-numbers
- List all the rules in the iptables of chain MAHAKALA_BLACKLIST_INPUTiptables -L -n --line-numbers
- List all the rules in the iptablesiptables -D INPUT <rule number>
- Delete a rule from iptables