Skip to content
/ IPBAN Public

⚔️🧱🔥🛑IP BAN Block Allow GEOIP country traffic limit server input/output to IP countries with iptables+xt_geoip, auto db-ip update, firewall fail2ban gfw ufw cidr blacklist netfilter rules persistent restrict netaddr xtables linux debian ubuntu apache nginx web server anti hack ddos firewalld ipblocks ipdeny ip ranges MaxMind ipset

License

Notifications You must be signed in to change notification settings

AliDbg/IPBAN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 

Repository files navigation

IPBAN (Limiting IP countries with iptables+xt_geoip)

  • Full IP Range
  • Support IPv4-v6
  • Support Multi-Country
  • Support all protocols and ports
  • Support INPUT/OUTPUT Server
  • Persistent settings after reboot
  • Automatic IP update every day
  • Support Debian v11-12, Ubuntu v20-22

Upgrade and reboot your server>> apt update && apt -y upgrade && sleep 3 && reboot

Install

bash <(wget -qO- https://raw.githubusercontent.com/AliDbg/IPBAN/main/ipban.sh) -install yes -io OUTPUT -geoip CN,IR,RU,CU,VN,ZW,BY -limit DROP -noicmp yes

Add Rules

bash <(wget -qO- https://raw.githubusercontent.com/AliDbg/IPBAN/main/ipban.sh) -add yes -io INPUT -geoip CN,RU -limit DROP

Reset Rules

bash <(wget -qO- https://raw.githubusercontent.com/AliDbg/IPBAN/main/ipban.sh) -reset yes

Remove IPBAN

bash <(wget -qO- https://raw.githubusercontent.com/AliDbg/IPBAN/main/ipban.sh) -remove yes

Arguments

-io INPUT or OUTPUT or FORWARD

-geoip Country Alpha-2 code

-limit DROP(Reject) or ACCEPT(Allow)

-noicmp yes (Disable ICMP Protocol for deny ping)

Tools

SSH Client: https://github.com/nirui/sshwifty

Checker: https://check-host.net

About

⚔️🧱🔥🛑IP BAN Block Allow GEOIP country traffic limit server input/output to IP countries with iptables+xt_geoip, auto db-ip update, firewall fail2ban gfw ufw cidr blacklist netfilter rules persistent restrict netaddr xtables linux debian ubuntu apache nginx web server anti hack ddos firewalld ipblocks ipdeny ip ranges MaxMind ipset

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages