A rudimentary and extensible honeypot framework for managing blacklists, IP blocking, and integration with firewalls. ( Beta)
- IPv4 and IPv6 Support: Seamlessly manages both IPv4 and IPv6 blacklists.
- Modular Design: Easily extendable with custom integrations.
- Firewall Integration: Blacklist endpoints (
/blacklist/v4and/blacklist/v6) can be directly used by firewall plugins. - Configurable via JSON: Adjust settings and integrations dynamically.
- Node.js: Version 16 or higher.
- npm: Ensure npm is available in your environment.
-
Clone the repository:
git clone ssh://git@github.com:22/SomethingWithPhp/fw-honeypot.git cd fw-honeypot -
Install dependencies:
npm install
-
Start the server:
npm start
-
For development mode with auto-reload:
npm run dev
The application uses a JSON configuration file (.env.json). Below is an example configuration:
{
"honeypot": {
"port": 8080,
"banDurationMs": 300000
},
"integrations": [
{
"name": "HoneypotSshServerIntegration",
"config": {
"port": 422,
"banDurationMs": 10000
}
}
]
}honeypot.port: Port for the honeypot API server.honeypot.banDurationMs: Duration in milliseconds for how long an IP stays on the blacklist.integrations: Array of integration configurations.
- combine ipv4 and ipv6
- Returns the list of blacklisted IPv4 addresses in
text/plainformat. - Each IP is suffixed with
/32.
- Returns the list of blacklisted IPv4 addresses in
application/jsonformat. - Each IP is suffixed with
/32.
- Returns the list of blacklisted IPv6 addresses in
text/plainformat.
- Returns the list of blacklisted IPv6 addresses in
application/jsonformat.
server.js: Main entry point for starting the server.IPList.js: Manages IPv4 and IPv6 blacklists.CreateHoneypot.js: Dynamically loads and manages integrations.Config.js: Reads and parses the configuration file.
npm start: Starts the server.npm run dev: Starts the server in development mode withnodemon.
Feel free to open an issue or submit a pull request! All contributions are welcome as this project is still in its beta phase.
This project is licensed under the MIT License.
This project is in Beta. It is a rudimentary implementation and may not cover all edge cases. Use at your own risk.