{"id":28292706,"url":"https://github.com/haikelfazzani/fireblock","last_synced_at":"2025-07-15T18:40:41.065Z","repository":{"id":105871387,"uuid":"602279175","full_name":"haikelfazzani/Fireblock","owner":"haikelfazzani","description":"🛡️ 🧱 Bash scripts to manage firewall rules \u0026 hosts file for blocking malware, phishing \u0026 malicious domains for a safer internet.","archived":false,"fork":false,"pushed_at":"2024-04-09T07:02:41.000Z","size":15,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-13T19:42:21.259Z","etag":null,"topics":["alienvault","firewall","hosts","ipset","iptables","linux","malicious","malware","pishing"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/haikelfazzani.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-02-15T21:48:47.000Z","updated_at":"2024-07-07T07:50:54.000Z","dependencies_parsed_at":"2024-04-09T08:25:57.009Z","dependency_job_id":"2c6ce47e-51ed-4572-96c8-d9105407c98f","html_url":"https://github.com/haikelfazzani/Fireblock","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/haikelfazzani/Fireblock","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haikelfazzani%2FFireblock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haikelfazzani%2FFireblock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haikelfazzani%2FFireblock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haikelfazzani%2FFireblock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/haikelfazzani","download_url":"https://codeload.github.com/haikelfazzani/Fireblock/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haikelfazzani%2FFireblock/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265451510,"owners_count":23767771,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alienvault","firewall","hosts","ipset","iptables","linux","malicious","malware","pishing"],"created_at":"2025-05-22T05:11:04.680Z","updated_at":"2025-07-15T18:40:41.053Z","avatar_url":"https://github.com/haikelfazzani.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fireblock\nBash scripts to manage firewall rules \u0026 hosts file for blocking malware, phishing \u0026 malicious domains for a safer internet.\n\n# Getting Started\n\n## Clone the repository\n```shell\ngit clone https://github.com/haikelfazzani/Fireblock\ncd Fireblock\n```\n\n## IPtables installation\n```shell\napt install ipset iptables netfilter-persistent ipset-persistent iptables-persistent\n```\n\n# Commands\n***block websites: update /etc/hosts***\n```shell\nbash hosts-file/index.sh\n```\n\n***update firewall rules for range IP***\n```shell\nbash firewall/block_range.sh\n```\n\n***update firewall rules for list IP***\n```shell\nbash firewall/block_ips.sh\n```\n\n***update firewall rules for common rules***\n```shell\nbash firewall/common-rules.sh\n```\n\n***update all***\n```shell\nbash update-all.sh\n```\n\n# Some useful iptables rules\n\n***DROP RFC1918 PACKETS***\n```shell\n-A INPUT -s 10.0.0.0/8 -j DROP\n-A INPUT -s 172.16.0.0/12 -j DROP\n-A INPUT -s 192.168.0.0/16 -j DROP\n```\n\n***Outbound UDP Flood protection***\n```shell\niptables -N udp-flood\niptables -A OUTPUT -p udp -j udp-flood\niptables -A udp-flood -p udp -m limit --limit 50/s -j RETURN\niptables -A udp-flood -j LOG --log-level 4 --log-prefix 'UDP-flood attempt: '\niptables -A udp-flood -j DROP\n```\n\n***prevent flooding general***\n```shell\niptables -N udp-flood\niptables -A udp-flood -m limit --limit 4/second --limit-burst 4 -j RETURN\niptables -A udp-flood -j DROP\niptables -A INPUT -i eth0 -p udp -j udp-flood\niptables -A INPUT -i eth0 -f -j DROP\n```\n\n***prevent amplification attack***\n```shell\niptables -N DNSAMPLY\niptables -A DNSAMPLY -p udp -m state --state NEW -m udp --dport 53 -j ACCEPT\niptables -A DNSAMPLY -p udp -m hashlimit --hashlimit-srcmask 24 --hashlimit-mode srcip --hashlimit-upto 30/m --hashlimit-burst 10 --hashlimit-name DNSTHROTTLE --dport 53 -j ACCEPT\niptables -A DNSAMPLY -p udp -m udp --dport 53 -j DROP\n```\n\n# Contributing\n\nWe welcome contributions to improve and expand this project. Feel free to submit pull requests for bug fixes, feature enhancements, or additional security measures.\n\n# Notes\n- [Old Repository of the project](https://gitlab.com/haikelfazzani/hosts)\n- [Block list Repository](https://gitlab.com/haikelfazzani/blocklist)\n\n# Read more\n- [A Tutorial for Controlling Network Traffic with iptables](https://www.linode.com/docs/guides/control-network-traffic-with-iptables/)\n- [IPset reference](https://manpages.debian.org/testing/ipset/ipset.8.en.html)\n- [Iptables Essentials](https://github.com/trimstray/iptables-essentials/blob/master/README.md#xmas-packets)\n- [IPtables persist](https://unix.stackexchange.com/questions/52376/why-do-iptables-rules-disappear-when-restarting-my-debian-system)\n\n# License\nApache 2.0","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaikelfazzani%2Ffireblock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhaikelfazzani%2Ffireblock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaikelfazzani%2Ffireblock/lists"}