Setup SSH tarpit with prometheus integration.
This commit is contained in:
parent
6c290fa729
commit
45d22ff08c
30
nixos/viridian/services/endlessh-go.nix
Normal file
30
nixos/viridian/services/endlessh-go.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
services.endlessh-go = {
|
||||
enable = true;
|
||||
port = 22; # SSH port
|
||||
prometheus = {
|
||||
enable = true;
|
||||
listenAddress = "127.0.0.1";
|
||||
port = 2112; # Prometheus metrics port
|
||||
};
|
||||
extraOptions = [
|
||||
"-interval_ms=1000"
|
||||
"-logtostderr"
|
||||
"-v=1"
|
||||
"-geoip_supplier=ip-api"
|
||||
];
|
||||
openFirewall = true;
|
||||
};
|
||||
|
||||
services.prometheus.scrapeConfigs = [
|
||||
{
|
||||
job_name = "endlessh";
|
||||
static_configs = [{
|
||||
targets = [ "127.0.0.1:${toString config.services.endlessh-go.prometheus.port}" ];
|
||||
}];
|
||||
}
|
||||
];
|
||||
}
|
||||
|
Loading…
Reference in a new issue