{"id":40244568,"url":"https://github.com/vv198x/go2ban","last_synced_at":"2026-01-20T00:07:42.499Z","repository":{"id":65788625,"uuid":"573038049","full_name":"vv198x/go2ban","owner":"vv198x","description":"Protect your servers","archived":false,"fork":false,"pushed_at":"2025-08-16T15:04:39.000Z","size":68319,"stargazers_count":6,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-16T15:32:33.759Z","etag":null,"topics":["firewall","go","golang","open-source","security"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vv198x.png","metadata":{"files":{"readme":"README.md","changelog":"change.log","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,"publiccode":null,"codemeta":null}},"created_at":"2022-12-01T15:07:41.000Z","updated_at":"2025-08-16T15:04:43.000Z","dependencies_parsed_at":"2024-06-20T08:24:17.638Z","dependency_job_id":"493765d6-8f1a-4c58-918b-07f32c8d9bb6","html_url":"https://github.com/vv198x/go2ban","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/vv198x/go2ban","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vv198x%2Fgo2ban","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vv198x%2Fgo2ban/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vv198x%2Fgo2ban/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vv198x%2Fgo2ban/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vv198x","download_url":"https://codeload.github.com/vv198x/go2ban/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vv198x%2Fgo2ban/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28590676,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T00:01:37.455Z","status":"ssl_error","status_checked_at":"2026-01-19T23:58:17.328Z","response_time":67,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["firewall","go","golang","open-source","security"],"created_at":"2026-01-20T00:07:41.852Z","updated_at":"2026-01-20T00:07:42.491Z","avatar_url":"https://github.com/vv198x.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# 🛡️ go2ban\n\n[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\n![Coverage](https://img.shields.io/badge/Coverage-80.6%25-brightgreen)\n[![Go Reference](https://pkg.go.dev/badge/github.com/vv198x/go2ban.svg)](https://pkg.go.dev/github.com/vv198x/go2ban)\n[![Go Report Card](https://goreportcard.com/badge/github.com/vv198x/go2ban)](https://goreportcard.com/report/github.com/vv198x/go2ban)\n[![Go Version](https://img.shields.io/badge/Go-1.21.6+-blue.svg)](https://golang.org)\n\n**Powerful VDS/VPS protection system against brute force attacks, scanners and DDoS**\n\n![](deploy/gophers.png)\n\n\u003c/div\u003e\n\n---\n\n## 🌍 Why is go2ban important today?\n\n\u003e **📊 Shocking statistics:** More than 50% of all internet traffic consists of hacker bots, password crackers, and automated vulnerability scanners. Every day, thousands of servers are attacked, leading to enormous losses of computational resources and administrators' time.\n\n**go2ban** is a modern solution for protecting your servers that not only blocks attackers but also significantly saves computational power, making the internet safer for everyone.\n\n### 🎯 Key advantages\n\n- **⚡ Instant blocking** in iptables raw table\n- **🔍 Smart monitoring** of service logs and Docker containers  \n- **🎣 Trap ports** for automatic scanner detection\n- **🌐 REST API and gRPC** for integration with your systems\n- **📈 Resource savings** — up to 70% reduction in CPU load\n- **🛡️ Whitelist** for trusted IP addresses\n\n---\n\n## 🚀 Quick Installation (Recommended)\n\nFor the easiest installation experience, use the automated installation script:\n\n```bash\n# Clone the repository\ngit clone https://github.com/vv198x/go2ban.git\ncd go2ban\n\n# Run the installation\nchmod +x install.sh\n./install.sh\n```\n\n### ✨ What the script does automatically:\n\n- ✅ Checks and installs Go 1.21.6 if needed\n- ✅ Installs dependencies (make, git, wget)\n- ✅ Builds the go2ban binary\n- ✅ Installs the systemd service\n- ✅ Opens the configuration file for editing\n- ✅ Optionally starts and enables the service\n\n\u003e **💡 Tip:** Run the script as a regular user (not root). It will prompt for sudo password when needed.\n\n---\n\n## 🔧 Manual Installation\n\n### Prerequisites\nMake sure you have Go version \u003e=1.15 installed\n\n```bash\n# 1. Clone the repository\ngit clone https://github.com/vv198x/go2ban.git\n\n# 2. Build the binary\nmake\n\n# 3. Run the installer\nsudo make install\n\n# 4. Configure go2ban\nvi /etc/go2ban/go2ban.conf\n\n# 5. Start and enable the service\nsudo systemctl --now enable go2ban\n```\n\n---\n\n## ⚙️ Configuration\n\nThe [config](deploy/go2ban.conf) file allows you to customize all aspects of operation:\n\n### 🔥 Basic settings\n\n| Parameter | Description | Default |\n|-----------|-------------|---------|\n| `firewall` | Automatic firewall rule management or disable | `auto` |\n| `log_dir` | Directory for go2ban logs | `/var/log/go2ban` |\n| `white_list` | IP addresses that will never be blocked | - |\n| `blocked_ips` | Maximum number of blocked IPs | `1000` |\n\n### 🌐 API and integrations\n\n| Parameter | Description | Default |\n|-----------|-------------|---------|\n| `grpc_port` | Port for gRPC communication | `off` |\n| `rest_port` | Port for REST API blocking | `off` |\n\n### 🎣 Traps and protection\n\n| Parameter | Description | Default |\n|-----------|-------------|---------|\n| `trap_ports` | Trap ports for scanners | `off` |\n| `trap_fails` | Number of attempts before blocking | `3` |\n| `local_service_check_minutes` | Frequency of service checking | `5` |\n| `local_service_fails` | Number of failed attempts | `5` |\n\n### 🌍 AbuseIPDB integration\n\n| Parameter | Description | Default |\n|-----------|-------------|---------|\n| `abuseipdb_apikey` | API key for AbuseIPDB | `off` |\n| `abuseipdb_ips` | Number of IPs to block from AbuseIPDB | `100` |\n\n---\n\n## 💻 Command line\n\n```bash\ngo2ban [options]\n\nOptions:\n  -cfgFile string\n        Path to configuration file\n  -clear\n        Unblock all IPs\n  -d    Run as daemon\n```\n\n---\n\n## 🎯 How it works\n\ngo2ban runs as a background service, constantly monitoring:\n\n1. **📊 Service logs** — databases, web servers, Docker containers\n2. **🔍 Connection attempts** to trap ports\n3. **🌐 External threats** via AbuseIPDB API\n4. **⚡ Automatic blocking** in iptables raw table\n\n### 🚀 Advantages of blocking in raw table\n\n| Advantage | Description |\n|-----------|-------------|\n| **⚡ Speed** | Raw table is the first table in the iptables chain, providing instant blocking |\n| **🛡️ Security** | Strong first line of defense against incoming traffic |\n| **💾 Resource savings** | Connections are never established, reducing CPU load |\n\n---\n\n## 🌟 Impact on the ecosystem\n\n### 📈 Computational power savings\n\nThanks to effective blocking of attackers at the raw table level, go2ban helps:\n\n- **Reduce CPU load** by up to 70% on attacked servers\n- **Save network bandwidth**\n- **Reduce response time** for legitimate users\n- **Make the internet faster** for everyone\n\n### 🌍 Security for everyone\n\nEvery blocked attacker means:\n- ✅ Fewer attacks on other servers\n- ✅ Reduced overall threat level in the network\n- ✅ More stable operation of internet infrastructure\n\n---\n\n## 🛠️ Development\n\ngo2ban is developed in **Go** using **iptables** for firewall management. The code is open to the community, and we welcome developer contributions!\n\n### 🏗️ Technology stack\n\n- **Go 1.21.6+** — main development language\n- **iptables/netfilter** — firewall management\n- **systemd** — system service\n- **gRPC/REST** — API for integration\n\n---\n\n## 📋 Changelog\n\nFor a detailed list of changes in each version, see the [change.log](change.log) file in the repository.\n\n---\n\n## 🤝 Support\n\nIf you encounter any issues or have questions:\n\n- 📝 [Create an Issue](https://github.com/vv198x/go2ban/issues)\n- 💬 Contact the developer\n- 📚 Study the documentation\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n**🛡️ Protect your server today and help make the internet safer!**\n\n[⭐ Star on GitHub](https://github.com/vv198x/go2ban)\n\n\u003c/div\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvv198x%2Fgo2ban","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvv198x%2Fgo2ban","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvv198x%2Fgo2ban/lists"}