{"id":388,"date":"2026-03-24T17:21:21","date_gmt":"2026-03-24T16:21:21","guid":{"rendered":"https:\/\/netcloud24.com\/pl\/blog\/?p=388"},"modified":"2026-03-24T17:21:21","modified_gmt":"2026-03-24T16:21:21","slug":"jak-zainstalowac-csf-configserver-firewall-na-debian-12","status":"publish","type":"post","link":"https:\/\/netcloud24.com\/pl\/blog\/jak-zainstalowac-csf-configserver-firewall-na-debian-12\/","title":{"rendered":"Jak zainstalowa\u0107 CSF (ConfigServer Firewall) na Debian 12"},"content":{"rendered":"<p><!DOCTYPE html><br \/>\n<html lang=\"pl\"><br \/>\n<head><br \/>\n<meta charset=\"UTF-8\"><br \/>\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"><br \/>\n<title>Jak zainstalowa\u0107 CSF (ConfigServer Firewall) na Debian 12<\/title><br \/>\n<meta name=\"description\" content=\"Instalacja i konfiguracja CSF (ConfigServer Firewall) na Debian 12 \u2013 krok po kroku + integracja z ISPConfig.\"><\/p>\n<style>\nbody { font-family: Arial, sans-serif; line-height: 1.6; margin: 40px; background:#0f172a; color:#e2e8f0; }\nh1,h2,h3 { color:#38bdf8; }\ncode { background:#1e293b; padding:4px 6px; border-radius:4px; }\npre { background:#020617; padding:15px; overflow:auto; border-radius:8px; }\na { color:#22c55e; }\n.box { background:#1e293b; padding:20px; border-radius:10px; margin:20px 0; }\n.cta { background:#22c55e; color:#000; padding:20px; border-radius:10px; font-weight:bold; }\n.warn { background:#ef4444; padding:20px; border-radius:10px; }\n<\/style>\n<p><\/head><br \/>\n<body><\/p>\n<h1>Instalacja CSF (ConfigServer Firewall) na Debian 12<\/h1>\n<p>CSF (ConfigServer Firewall) to zaawansowany firewall oparty o iptables, kt\u00f3ry integruje si\u0119 z serwerami hostingowymi (np. ISPConfig) i zapewnia ochron\u0119 przed atakami brute-force, DDoS oraz skanowaniem port\u00f3w.<\/p>\n<div class=\"cta\">\n\u26a1 Stabilny VPS pod CSF + ISPConfig:<br \/>\n\ud83d\udc49 <a href=\"https:\/\/netcloud24.com\" target=\"_blank\">netcloud24.com<\/a><br \/>\nNVMe SSD \u2022 Xeon \u2022 Backup 14 dni \u2022 99.99% SLA \u2022 Gotowy w 5 minut<\/p>\n<p>\ud83d\udcbb VPS Windows (RDP + CAL) dla biznesu:<br \/>\n\ud83d\udc49 https:\/\/netcloud24.com\n<\/p><\/div>\n<h2>1. Wymagania<\/h2>\n<ul>\n<li>Debian 12 (Bookworm)<\/li>\n<li>Root access<\/li>\n<li>Wy\u0142\u0105czony UFW (zalecane)<\/li>\n<\/ul>\n<h2>2. Wy\u0142\u0105czenie innych firewalli<\/h2>\n<pre>\r\nufw disable\r\nsystemctl stop firewalld\r\n<\/pre>\n<h2>3. Instalacja zale\u017cno\u015bci<\/h2>\n<pre>\r\napt update\r\napt install perl libwww-perl liblwp-protocol-https-perl iptables -y\r\n<\/pre>\n<h2>4. Pobranie CSF<\/h2>\n<pre>\r\ncd \/usr\/src\r\nrm -fv csf.tgz\r\nwget https:\/\/download.configserver.com\/csf.tgz\r\ntar -xzf csf.tgz\r\ncd csf\r\n<\/pre>\n<h2>5. Instalacja<\/h2>\n<pre>\r\nsh install.sh\r\n<\/pre>\n<h2>6. Test kompatybilno\u015bci<\/h2>\n<pre>\r\nperl \/usr\/local\/csf\/bin\/csftest.pl\r\n<\/pre>\n<div class=\"box\">\n\u2714 Je\u015bli wszystkie testy OK \u2013 mo\u017cesz przej\u015b\u0107 dalej\n<\/div>\n<h2>7. Konfiguracja CSF<\/h2>\n<pre>\r\nnano \/etc\/csf\/csf.conf\r\n<\/pre>\n<p>Zmie\u0144:<\/p>\n<pre>\r\nTESTING = \"0\"\r\n<\/pre>\n<h3>Otw\u00f3rz podstawowe porty<\/h3>\n<pre>\r\nTCP_IN = \"20,21,22,25,53,80,110,143,443,465,587,993,995,8080\"\r\nTCP_OUT = \"20,21,22,25,53,80,443,587\"\r\n<\/pre>\n<h2>8. Restart CSF<\/h2>\n<pre>\r\ncsf -r\r\n<\/pre>\n<h2>9. Integracja z ISPConfig<\/h2>\n<p>CSF dzia\u0142a automatycznie \u2013 dodatkowo mo\u017cesz monitorowa\u0107 logi i blokady:<\/p>\n<pre>\r\ncsf -l\r\n<\/pre>\n<h2>10. Blokowanie IP<\/h2>\n<pre>\r\ncsf -d 1.2.3.4\r\n<\/pre>\n<h2>11. Odblokowanie IP<\/h2>\n<pre>\r\ncsf -dr 1.2.3.4\r\n<\/pre>\n<h2>12. Auto-blokady (LFD)<\/h2>\n<p>CSF zawiera LFD (Login Failure Daemon), kt\u00f3ry automatycznie blokuje brute-force:<\/p>\n<pre>\r\nsystemctl enable lfd\r\nsystemctl start lfd\r\n<\/pre>\n<h2>13. Najcz\u0119stsze b\u0142\u0119dy<\/h2>\n<ul>\n<li>Zapomniane TESTING=1 (firewall nie dzia\u0142a)<\/li>\n<li>Zablokowany port SSH (22)<\/li>\n<li>Konflikt z innym firewallem<\/li>\n<\/ul>\n<div class=\"warn\">\n\u2757 Przed restartem upewnij si\u0119, \u017ce port SSH (22) jest otwarty\n<\/div>\n<h2>14. Optymalizacja bezpiecze\u0144stwa<\/h2>\n<ul>\n<li>Ogranicz SSH do swojego IP<\/li>\n<li>W\u0142\u0105cz SYNFLOOD<\/li>\n<li>Ustaw LF_LOGIN failures<\/li>\n<\/ul>\n<h2>15. Podsumowanie<\/h2>\n<p>CSF to jedno z najlepszych rozwi\u0105za\u0144 firewall dla serwer\u00f3w hostingowych. W po\u0142\u0105czeniu z ISPConfig daje pe\u0142n\u0105 kontrol\u0119 nad bezpiecze\u0144stwem.<\/p>\n<div class=\"cta\">\n\ud83d\ude80 Bezpieczny VPS pod hosting i RDP:<br \/>\n\ud83d\udc49 https:\/\/netcloud24.com<\/p>\n<p>\u2714 Windows VPS + RDS CAL<br \/>\n\u2714 Linux VPS pod ISPConfig<br \/>\n\u2714 Backup + DDoS protection\n<\/p><\/div>\n<p><\/body><br \/>\n<\/html><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Jak zainstalowa\u0107 CSF (ConfigServer Firewall) na Debian 12 Instalacja CSF (ConfigServer Firewall) na Debian 12 CSF (ConfigServer Firewall) to zaawansowany firewall oparty o iptables, kt\u00f3ry\u2026<\/p>\n","protected":false},"author":1,"featured_media":377,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,2],"tags":[],"class_list":["post-388","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","category-windows"],"_links":{"self":[{"href":"https:\/\/netcloud24.com\/pl\/blog\/wp-json\/wp\/v2\/posts\/388","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/netcloud24.com\/pl\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/netcloud24.com\/pl\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/netcloud24.com\/pl\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/netcloud24.com\/pl\/blog\/wp-json\/wp\/v2\/comments?post=388"}],"version-history":[{"count":1,"href":"https:\/\/netcloud24.com\/pl\/blog\/wp-json\/wp\/v2\/posts\/388\/revisions"}],"predecessor-version":[{"id":389,"href":"https:\/\/netcloud24.com\/pl\/blog\/wp-json\/wp\/v2\/posts\/388\/revisions\/389"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/netcloud24.com\/pl\/blog\/wp-json\/wp\/v2\/media\/377"}],"wp:attachment":[{"href":"https:\/\/netcloud24.com\/pl\/blog\/wp-json\/wp\/v2\/media?parent=388"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/netcloud24.com\/pl\/blog\/wp-json\/wp\/v2\/categories?post=388"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/netcloud24.com\/pl\/blog\/wp-json\/wp\/v2\/tags?post=388"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}