CrowdSec, Fail2ban oder was anderes

  • Ab sofort steht euch hier im Forum die neue Add-on Verwaltung zur Verfügung – eine zentrale Plattform für alles rund um Erweiterungen und Add-ons für den DSM.

    Damit haben wir einen Ort, an dem Lösungen von Nutzern mit der Community geteilt werden können. Über die Team Funktion können Projekte auch gemeinsam gepflegt werden.

    Was die Add-on Verwaltung kann und wie es funktioniert findet Ihr hier

    Hier geht es zu den Add-ons

update-freak

Benutzer
Registriert
19. Feb. 2018
Beiträge
475
Reaktionspunkte
53
Punkte
28
Hi zusammen,

ich frage mich gerade ob ich für meine Dienste (https://www.synology-forum.de/threa...beispiele-als-denkanstoss.108931/post-1267058) und mein NAS grundsätzlich noch z.B. CrowdSec oder Fail2ban installieren sollte (einige Dienste sind per Reverse Proxy außerhalb erreichbar)?

Aktuell habe ich die Firewall so konfiguriert
Ports: Alle, Protokoll: Alle, Quell-IP: 192.168.178.0/255.255.255.0, Aktion: zulassen
Ports: Alle, Protokoll: Alle, Quell-IP: 172.0.0.0/255.0.0.0, Aktion: zulassen
Ports: Alle, Protokoll: Alle, Quell-IP: 192.168.0.0/255.255.0.0, Aktion: zulassen
Ports: Alle, Protokoll: Alle, Quell-IP: Schweiz, Deutschland, Österreich, Aktion: zulassen
Ports: Alle, Protokoll: Alle, Quell-IP: Alle, Aktion: verweigern

Zusätzlich habe ich Blocklisten eingerichtet, die jeden Tag aktualisiert werden:
https://www.synology-forum.de/threads/staendige-anmeldeversuche-am-dsm.122250/page-2#post-1015901

Ist nun CrowdSec, Fail2ban, ssh-Tarpit zusätzlich erforderlich?
 
Ich nutze NPMplus als Proxy in Verbindung mit Crowdsec, da wird schon einiges gebounced.
Code:
root@raspi-proxy:~# docker exec -it crowdsec cscli metrics
╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Acquisition Metrics                                                                                                          │
├────────────────────────────────────┬────────────┬──────────────┬────────────────┬────────────────────────┬───────────────────┤
│ Source                             │ Lines read │ Lines parsed │ Lines unparsed │ Lines poured to bucket │ Lines whitelisted │
├────────────────────────────────────┼────────────┼──────────────┼────────────────┼────────────────────────┼───────────────────┤
│ file:/opt/npmplus/nginx/access.log │ 29.32k     │ 29.32k       │ -              │ 11.70k                 │ 21.85k            │
│ file:/opt/npmplus/nginx/error.log  │ 174        │ 138          │ 36             │ 92                     │ -                 │
╰────────────────────────────────────┴────────────┴──────────────┴────────────────┴────────────────────────┴───────────────────╯
╭────────────────────────────────────────────────────╮
│ Local API Alerts                                   │
├────────────────────────────────────────────┬───────┤
│ Reason                                     │ Count │
├────────────────────────────────────────────┼───────┤
│ crowdsecurity/http-admin-interface-probing │ 3     │
│ crowdsecurity/http-crawl-non_statics       │ 4     │
│ crowdsecurity/http-cve-2021-41773          │ 25    │
│ crowdsecurity/http-cve-2021-42013          │ 2     │
│ crowdsecurity/http-open-proxy              │ 14    │
│ crowdsecurity/http-sensitive-files         │ 2     │
│ LePresidente/http-generic-403-bf           │ 2     │
│ crowdsecurity/http-bad-user-agent          │ 12    │
│ crowdsecurity/http-probing                 │ 10    │
│ test-ban                                   │ 1     │
╰────────────────────────────────────────────┴───────╯
╭───────────────────────────────────────────────────────────╮
│ Local API Decisions                                       │
├───────────────────────────────┬──────────┬────────┬───────┤
│ Reason                        │ Origin   │ Action │ Count │
├───────────────────────────────┼──────────┼────────┼───────┤
│ http:bruteforce               │ CAPI     │ ban    │ 16689 │
│ http:crawl                    │ CAPI     │ ban    │ 60    │
│ http:exploit                  │ CAPI     │ ban    │ 61    │
│ http:scan                     │ CAPI     │ ban    │ 6266  │
│ crowdsecurity/http-open-proxy │ crowdsec │ ban    │ 1     │
│ firehol_greensnow             │ lists    │ ban    │ 7503  │
╰───────────────────────────────┴──────────┴────────┴───────╯
╭─────────────────────────────────────╮
│ Local API Metrics                   │
├────────────────────┬────────┬───────┤
│ Route              │ Method │ Hits  │
├────────────────────┼────────┼───────┤
│ /v1/alerts         │ GET    │ 21553 │
│ /v1/alerts         │ POST   │ 19    │
│ /v1/decisions      │ GET    │ 13391 │
│ /v1/heartbeat      │ GET    │ 2779  │
│ /v1/usage-metrics  │ POST   │ 272   │
│ /v1/watchers/login │ POST   │ 15970 │
╰────────────────────┴────────┴───────╯
╭──────────────────────────────────────────╮
│ Local API Bouncers Metrics               │
├─────────┬───────────────┬────────┬───────┤
│ Bouncer │ Route         │ Method │ Hits  │
├─────────┼───────────────┼────────┼───────┤
│ npmplus │ /v1/decisions │ GET    │ 13391 │
╰─────────┴───────────────┴────────┴───────╯
╭─────────────────────────────────────────────╮
│ Local API Bouncers Decisions                │
├─────────┬───────────────┬───────────────────┤
│ Bouncer │ Empty answers │ Non-empty answers │
├─────────┼───────────────┼───────────────────┤
│ npmplus │ 13299         │ 92                │
╰─────────┴───────────────┴───────────────────╯
╭──────────────────────────────────────────────────╮
│ Local API Machines Metrics                       │
├─────────────────┬───────────────┬────────┬───────┤
│ Machine         │ Route         │ Method │ Hits  │
├─────────────────┼───────────────┼────────┼───────┤
│ crowdsec-web-ui │ /v1/alerts    │ GET    │ 21457 │
│ localhost       │ /v1/alerts    │ GET    │ 10    │
│ localhost       │ /v1/alerts    │ POST   │ 19    │
│ localhost       │ /v1/heartbeat │ GET    │ 2779  │
╰─────────────────┴───────────────┴────────┴───────╯
╭─────────────────────────────────────────────────────────────────╮
│ Parser Metrics                                                  │
├────────────────────────────────────┬────────┬────────┬──────────┤
│ Parsers                            │ Hits   │ Parsed │ Unparsed │
├────────────────────────────────────┼────────┼────────┼──────────┤
│ ZoeyVid/npmplus-logs               │ 29.32k │ 29.32k │ -        │
│ child-ZoeyVid/npmplus-logs         │ 29.43k │ 29.32k │ 108      │
│ child-crowdsecurity/http-logs      │ 88.37k │ 60.00k │ 28.37k   │
│ child-crowdsecurity/nginx-logs     │ 492    │ 138    │ 354      │
│ crowdsecurity/cdn-whitelist        │ 21     │ 21     │ -        │
│ crowdsecurity/dateparse-enrich     │ 29.46k │ 29.46k │ -        │
│ crowdsecurity/geoip-enrich         │ 20.41k │ 20.41k │ -        │
│ crowdsecurity/http-logs            │ 29.46k │ 29.40k │ 53       │
│ crowdsecurity/nginx-logs           │ 174    │ 138    │ 36       │
│ crowdsecurity/non-syslog           │ 29.49k │ 29.49k │ -        │
│ crowdsecurity/public-dns-allowlist │ 29.46k │ 29.46k │ -        │
│ crowdsecurity/rdns                 │ 21     │ 21     │ -        │
│ crowdsecurity/seo-bots-whitelist   │ 21     │ 21     │ -        │
│ crowdsecurity/whitelists           │ 29.46k │ 29.46k │ -        │
│ my/whitelist                       │ 29.46k │ 29.46k │ -        │
╰────────────────────────────────────┴────────┴────────┴──────────╯
╭──────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Scenario Metrics                                                                                         │
├────────────────────────────────────────────┬───────────────┬───────────┬──────────────┬────────┬─────────┤
│ Scenario                                   │ Current Count │ Overflows │ Instantiated │ Poured │ Expired │
├────────────────────────────────────────────┼───────────────┼───────────┼──────────────┼────────┼─────────┤
│ LePresidente/http-generic-403-bf           │ -             │ 1         │ 3            │ 9      │ 2       │
│ crowdsecurity/http-admin-interface-probing │ -             │ 1         │ 2            │ 4      │ 1       │
│ crowdsecurity/http-bad-user-agent          │ -             │ 6         │ 15           │ 21     │ 9       │
│ crowdsecurity/http-crawl-non_statics       │ -             │ -         │ 11.42k       │ 11.56k │ 11.42k  │
│ crowdsecurity/http-cve-2021-41773          │ -             │ 6         │ 6            │ -      │ -       │
│ crowdsecurity/http-open-proxy              │ -             │ 7         │ 7            │ -      │ -       │
│ crowdsecurity/http-probing                 │ -             │ 4         │ 101          │ 174    │ 97      │
│ crowdsecurity/http-sensitive-files         │ -             │ 1         │ 19           │ 24     │ 18      │
╰────────────────────────────────────────────┴───────────────┴───────────┴──────────────┴────────┴─────────╯
╭───────────────────────────────────────────────────────────────────────────────────────────────╮
│ Whitelist Metrics                                                                             │
├────────────────────────────────────┬────────────────────────────────────┬───────┬─────────────┤
│ Whitelist                          │ Reason                             │ Hits  │ Whitelisted │
├────────────────────────────────────┼────────────────────────────────────┼───────┼─────────────┤
│ crowdsecurity/cdn-whitelist        │ CDN provider                       │ 21    │ -           │
│ crowdsecurity/public-dns-allowlist │ public DNS server                  │ 29455 │ -           │
│ crowdsecurity/seo-bots-whitelist   │ good bots (search engine crawlers) │ 21    │ -           │
│ crowdsecurity/whitelists           │ private ipv4/ipv6 ip/ranges        │ 29455 │ 9046        │
│ my/whitelist                       │ trusted                            │ 29455 │ 12799       │
╰────────────────────────────────────┴────────────────────────────────────┴───────┴─────────────╯
 
Ich würde Regel 4 auf nur die wirklichen benötigten Ports einschränken.Es gibt auch im deutschsprachigen Raum nicht nur gute Menschen.
 
Aber die Quell-IPs sind in den heutigen VPN Zeiten nicht mehr ein Garant, dass das dort keine "bösen Buben" sind. Die Regel mit dem Geo Zugriff ist, ich habe es auf meiner OpnSense auch noch an, ein Gimick aber kein wirklicher Schutz mehr, oder? Ich nutze den HA Proxy auf der OpnSense auch zusammen mit Crowdsec.
 
Zuletzt bearbeitet:
  • Like
Reaktionen: ctrlaltdelete

Additional post fields

 

Kaffeautomat

Wenn du das Forum hilfreich findest oder uns unterstützen möchtest, dann gib uns doch einfach einen Kaffee aus.

Als Dankeschön schalten wir deinen Account werbefrei.

:coffee:

Hier gehts zum Kaffeeautomat