Add step 02: Configure firewall with UFW
This commit is contained in:
+34
-3
@@ -37,13 +37,44 @@
|
|||||||
\@writefile{lol}{\contentsline {lstlisting}{\numberline {13}SSH-Dienst neustarten}{6}{lstlisting.13}\protected@file@percent }
|
\@writefile{lol}{\contentsline {lstlisting}{\numberline {13}SSH-Dienst neustarten}{6}{lstlisting.13}\protected@file@percent }
|
||||||
\@writefile{toc}{\contentsline {subsection}{\numberline {1.6}Schritt 6: Fail2Ban (Bruteforce-Schutz)}{6}{subsection.1.6}\protected@file@percent }
|
\@writefile{toc}{\contentsline {subsection}{\numberline {1.6}Schritt 6: Fail2Ban (Bruteforce-Schutz)}{6}{subsection.1.6}\protected@file@percent }
|
||||||
\BKM@entry{id=8,dest={73756273656374696F6E2E312E37},srcline={258}}{5C3337365C3337375C3030305A5C303030755C303030735C303030615C3030306D5C3030306D5C303030655C3030306E5C303030665C303030615C303030735C303030735C303030755C3030306E5C30303067}
|
\BKM@entry{id=8,dest={73756273656374696F6E2E312E37},srcline={258}}{5C3337365C3337375C3030305A5C303030755C303030735C303030615C3030306D5C3030306D5C303030655C3030306E5C303030665C303030615C303030735C303030735C303030755C3030306E5C30303067}
|
||||||
|
\BKM@entry{id=9,dest={73656374696F6E2E32},srcline={5}}{5C3337365C3337375C303030465C303030695C303030725C303030655C303030775C303030615C3030306C5C3030306C5C3030305C3034305C3030306D5C303030695C303030745C3030305C3034305C303030555C303030465C303030575C3030305C3034305C303030655C303030695C3030306E5C303030725C303030695C303030635C303030685C303030745C303030655C3030306E}
|
||||||
|
\BKM@entry{id=10,dest={73756273656374696F6E2E322E31},srcline={10}}{5C3337365C3337375C303030575C303030615C303030735C3030305C3034305C303030695C303030735C303030745C3030305C3034305C303030655C303030695C3030306E5C303030655C3030305C3034305C303030465C303030695C303030725C303030655C303030775C303030615C3030306C5C3030306C5C3030305C3034305C303030755C3030306E5C303030645C3030305C3034305C303030775C303030615C303030725C303030755C3030306D5C3030305C3034305C303030625C303030725C303030615C303030755C303030635C303030685C303030655C3030306E5C3030305C3034305C303030775C303030695C303030725C3030305C3034305C303030735C303030695C303030655C3030303F}
|
||||||
\@writefile{lol}{\contentsline {lstlisting}{\numberline {14}Beispiel: /etc/fail2ban/jail.local}{7}{lstlisting.14}\protected@file@percent }
|
\@writefile{lol}{\contentsline {lstlisting}{\numberline {14}Beispiel: /etc/fail2ban/jail.local}{7}{lstlisting.14}\protected@file@percent }
|
||||||
\@writefile{lol}{\contentsline {lstlisting}{\numberline {15}Fail2Ban installieren}{7}{lstlisting.15}\protected@file@percent }
|
\@writefile{lol}{\contentsline {lstlisting}{\numberline {15}Fail2Ban installieren}{7}{lstlisting.15}\protected@file@percent }
|
||||||
\@writefile{lol}{\contentsline {lstlisting}{\numberline {16}Fail2Ban aktivieren und starten}{7}{lstlisting.16}\protected@file@percent }
|
\@writefile{lol}{\contentsline {lstlisting}{\numberline {16}Fail2Ban aktivieren und starten}{7}{lstlisting.16}\protected@file@percent }
|
||||||
\@writefile{lol}{\contentsline {lstlisting}{\numberline {17}Fail2Ban-Status abfragen}{7}{lstlisting.17}\protected@file@percent }
|
\@writefile{lol}{\contentsline {lstlisting}{\numberline {17}Fail2Ban-Status abfragen}{7}{lstlisting.17}\protected@file@percent }
|
||||||
\@writefile{lol}{\contentsline {lstlisting}{\numberline {18}Erfolgreiche Ausgabe}{7}{lstlisting.18}\protected@file@percent }
|
\@writefile{lol}{\contentsline {lstlisting}{\numberline {18}Erfolgreiche Ausgabe}{7}{lstlisting.18}\protected@file@percent }
|
||||||
\@writefile{toc}{\contentsline {subsection}{\numberline {1.7}Zusammenfassung}{7}{subsection.1.7}\protected@file@percent }
|
\@writefile{toc}{\contentsline {subsection}{\numberline {1.7}Zusammenfassung}{7}{subsection.1.7}\protected@file@percent }
|
||||||
\global\@namedef{scr@dte@section@lastmaxnumwidth}{10.22392pt}
|
\@writefile{toc}{\contentsline {section}{\numberline {2}Firewall mit UFW einrichten}{7}{section.2}\protected@file@percent }
|
||||||
\global\@namedef{scr@dte@subsection@lastmaxnumwidth}{19.1159pt}
|
\newlabel{sec:step02}{{2}{7}{Firewall mit UFW einrichten}{section.2}{}}
|
||||||
|
\BKM@entry{id=11,dest={73756273656374696F6E2E322E32},srcline={21}}{5C3337365C3337375C303030445C303030695C303030655C3030305C3034305C303030365C303030355C3030302E5C303030355C303030335C303030355C3030305C3034305C303030505C3030306F5C303030725C303030745C303030735C3030303A5C3030305C3034305C303030455C303030695C3030306E5C3030305C3034305C3030306B5C303030755C303030725C3030307A5C303030655C303030725C3030305C3034305C3030305C3333345C303030625C303030655C303030725C303030625C3030306C5C303030695C303030635C3030306B}
|
||||||
|
\BKM@entry{id=12,dest={73756273656374696F6E2E322E33},srcline={52}}{5C3337365C3337375C303030445C303030695C303030655C3030305C3034305C303030645C303030725C303030655C303030695C3030305C3034305C303030505C3030306F5C303030725C303030745C303030735C3030302C5C3030305C3034305C303030645C303030695C303030655C3030305C3034305C303030775C303030695C303030725C3030305C3034305C3030305C3336365C303030665C303030665C3030306E5C303030655C3030306E}
|
||||||
|
\BKM@entry{id=13,dest={73756273656374696F6E2E322E34},srcline={70}}{5C3337365C3337375C303030575C303030615C303030725C303030755C3030306D5C3030305C3034305C303030485C303030545C303030545C303030505C303030535C3030305C3034305C303030665C3030305C3337345C303030725C3030305C3034305C303030505C303030575C303030415C303030735C3030305C3034305C303030505C303030665C3030306C5C303030695C303030635C303030685C303030745C3030305C3034305C303030695C303030735C30303074}
|
||||||
|
\@writefile{toc}{\contentsline {subsection}{\numberline {2.1}Was ist eine Firewall und warum brauchen wir sie?}{8}{subsection.2.1}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {subsection}{\numberline {2.2}Die 65.535 Ports: Ein kurzer Überblick}{8}{subsection.2.2}\protected@file@percent }
|
||||||
|
\@writefile{lot}{\contentsline {table}{\numberline {1}{\ignorespaces Bekannte Ports und ihre Dienste}}{8}{table.1}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {subsection}{\numberline {2.3}Die drei Ports, die wir öffnen}{8}{subsection.2.3}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {subsection}{\numberline {2.4}Warum HTTPS für PWAs Pflicht ist}{8}{subsection.2.4}\protected@file@percent }
|
||||||
|
\BKM@entry{id=14,dest={73756273656374696F6E2E322E35},srcline={82}}{5C3337365C3337375C303030445C303030755C303030725C303030635C303030685C303030665C3030305C3337345C303030685C303030725C303030755C3030306E5C30303067}
|
||||||
|
\BKM@entry{id=15,dest={73756273756273656374696F6E2E322E352E31},srcline={84}}{5C3337365C3337375C303030535C303030745C303030615C3030306E5C303030645C303030615C303030725C303030645C303030725C303030695C303030635C303030685C303030745C3030306C5C303030695C3030306E5C303030695C303030655C3030306E5C3030305C3034305C303030735C303030655C303030745C3030307A5C303030655C3030306E}
|
||||||
|
\@writefile{lot}{\contentsline {table}{\numberline {2}{\ignorespaces Geöffnete Ports und ihre Begründung}}{9}{table.2}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {subsection}{\numberline {2.5}Durchführung}{9}{subsection.2.5}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.5.1}Standardrichtlinien setzen}{9}{subsubsection.2.5.1}\protected@file@percent }
|
||||||
|
\@writefile{lol}{\contentsline {lstlisting}{\numberline {19}Firewall-Standardregeln definieren}{9}{lstlisting.19}\protected@file@percent }
|
||||||
|
\BKM@entry{id=16,dest={73756273756273656374696F6E2E322E352E32},srcline={105}}{5C3337365C3337375C303030425C303030655C3030306E5C3030305C3336365C303030745C303030695C303030675C303030745C303030655C3030305C3034305C303030505C3030306F5C303030725C303030745C303030735C3030305C3034305C3030305C3336365C303030665C303030665C3030306E5C303030655C3030306E}
|
||||||
|
\BKM@entry{id=17,dest={73756273756273656374696F6E2E322E352E33},srcline={125}}{5C3337365C3337375C303030465C303030695C303030725C303030655C303030775C303030615C3030306C5C3030306C5C3030305C3034305C303030615C3030306B5C303030745C303030695C303030765C303030695C303030655C303030725C303030655C3030306E}
|
||||||
|
\BKM@entry{id=18,dest={73756273756273656374696F6E2E322E352E34},srcline={141}}{5C3337365C3337375C3030304B5C3030306F5C3030306E5C303030665C303030695C303030675C303030755C303030725C303030615C303030745C303030695C3030306F5C3030306E5C3030305C3034305C3030305C3337345C303030625C303030655C303030725C303030705C303030725C3030305C3337345C303030665C303030655C3030306E}
|
||||||
|
\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.5.2}Benötigte Ports öffnen}{10}{subsubsection.2.5.2}\protected@file@percent }
|
||||||
|
\@writefile{lol}{\contentsline {lstlisting}{\numberline {20}Ports 22, 80, 443 für TCP freigeben}{10}{lstlisting.20}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.5.3}Firewall aktivieren}{10}{subsubsection.2.5.3}\protected@file@percent }
|
||||||
|
\@writefile{lol}{\contentsline {lstlisting}{\numberline {21}Firewall aktivieren}{10}{lstlisting.21}\protected@file@percent }
|
||||||
|
\BKM@entry{id=19,dest={73756273656374696F6E2E322E36},srcline={179}}{5C3337365C3337375C3030305A5C303030755C303030735C303030615C3030306D5C3030306D5C303030655C3030306E5C303030665C303030615C303030735C303030735C303030755C3030306E5C30303067}
|
||||||
|
\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.5.4}Konfiguration überprüfen}{11}{subsubsection.2.5.4}\protected@file@percent }
|
||||||
|
\@writefile{lol}{\contentsline {lstlisting}{\numberline {22}Firewall-Status mit Details anzeigen}{11}{lstlisting.22}\protected@file@percent }
|
||||||
|
\@writefile{lol}{\contentsline {lstlisting}{\numberline {23}Erwartete Firewall-Ausgabe (gekürzt)}{11}{lstlisting.23}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {subsection}{\numberline {2.6}Zusammenfassung}{11}{subsection.2.6}\protected@file@percent }
|
||||||
|
\global\@namedef{scr@dte@section@lastmaxnumwidth}{11.00392pt}
|
||||||
|
\global\@namedef{scr@dte@subsection@lastmaxnumwidth}{19.9919pt}
|
||||||
|
\global\@namedef{scr@dte@subsubsection@lastmaxnumwidth}{28.39188pt}
|
||||||
\@writefile{toc}{\providecommand\tocbasic@end@toc@file{}\tocbasic@end@toc@file}
|
\@writefile{toc}{\providecommand\tocbasic@end@toc@file{}\tocbasic@end@toc@file}
|
||||||
\gdef \@abspage@last{7}
|
\gdef \@abspage@last{11}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# Fdb version 4
|
# Fdb version 4
|
||||||
["pdflatex"] 1778074120.09737 "/home/computer/projects/fitness-app/LateX/main.tex" "main.pdf" "main" 1778074122.12685 0
|
["pdflatex"] 1778074526.98351 "/home/computer/projects/fitness-app/LateX/main.tex" "main.pdf" "main" 1778074529.108 0
|
||||||
"/etc/texmf/web2c/texmf.cnf" 1776891072.07073 475 c0e671620eb5563b2130f56340a5fde8 ""
|
"/etc/texmf/web2c/texmf.cnf" 1776891072.07073 475 c0e671620eb5563b2130f56340a5fde8 ""
|
||||||
"/home/computer/projects/fitness-app/LateX/main.tex" 1778074093.26733 8371 bc6535f0e305b66035a5ffbd170a43dd ""
|
"/home/computer/projects/fitness-app/LateX/main.tex" 1778074523.06229 8392 bdb3148a64fa8b2e535471367f7e4f1e ""
|
||||||
"/usr/share/texlive/texmf-dist/fonts/enc/dvips/fira/fir_d4q673.enc" 1570828436 2978 6d777d1174162fa94ff58f36782f4570 ""
|
"/usr/share/texlive/texmf-dist/fonts/enc/dvips/fira/fir_d4q673.enc" 1570828436 2978 6d777d1174162fa94ff58f36782f4570 ""
|
||||||
"/usr/share/texlive/texmf-dist/fonts/enc/dvips/fira/fir_d67aat.enc" 1570828436 3385 21a7e8c8dac3c39de5acda2c56e7bd7e ""
|
"/usr/share/texlive/texmf-dist/fonts/enc/dvips/fira/fir_d67aat.enc" 1570828436 3385 21a7e8c8dac3c39de5acda2c56e7bd7e ""
|
||||||
"/usr/share/texlive/texmf-dist/fonts/enc/dvips/fira/fir_iln36p.enc" 1570828436 3071 cfa92ee28d698dd9275559d9d1c3a233 ""
|
"/usr/share/texlive/texmf-dist/fonts/enc/dvips/fira/fir_iln36p.enc" 1570828436 3071 cfa92ee28d698dd9275559d9d1c3a233 ""
|
||||||
@@ -130,11 +130,12 @@
|
|||||||
"/usr/share/texmf/web2c/texmf.cnf" 1707919699 40399 f2c302f7d2af602abb742093540a5834 ""
|
"/usr/share/texmf/web2c/texmf.cnf" 1707919699 40399 f2c302f7d2af602abb742093540a5834 ""
|
||||||
"/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map" 1776891108.46284 5472669 54eaf61a88b6b7896ebd0dac973cb29c ""
|
"/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map" 1776891108.46284 5472669 54eaf61a88b6b7896ebd0dac973cb29c ""
|
||||||
"/var/lib/texmf/web2c/pdftex/pdflatex.fmt" 1776891271 8211336 7fc26d317f030a4855527787ba3b41d3 ""
|
"/var/lib/texmf/web2c/pdftex/pdflatex.fmt" 1776891271 8211336 7fc26d317f030a4855527787ba3b41d3 ""
|
||||||
"main.aux" 1778074122.0273 7735 f4542d2196552c3df8bcff51192d3d96 "pdflatex"
|
"main.aux" 1778074529.0082 14507 a445efc066d6f1fab05528a5ef320e35 "pdflatex"
|
||||||
"main.out" 1778074121.71426 0 d41d8cd98f00b204e9800998ecf8427e "pdflatex"
|
"main.out" 1778074528.61242 0 d41d8cd98f00b204e9800998ecf8427e "pdflatex"
|
||||||
"main.tex" 1778074093.26733 8371 bc6535f0e305b66035a5ffbd170a43dd ""
|
"main.tex" 1778074523.06229 8392 bdb3148a64fa8b2e535471367f7e4f1e ""
|
||||||
"main.toc" 1778074122.0303 889 a07239e3e6398f09c5d1494461a1ec11 "pdflatex"
|
"main.toc" 1778074529.0122 1951 c589379c8507d6fcc5ff4c6e2179786a "pdflatex"
|
||||||
"step_01.tex" 1778074119.30934 10807 dd7fc11a20ecebed2f07638ceddcf838 ""
|
"step_01.tex" 1778074119.30934 10807 dd7fc11a20ecebed2f07638ceddcf838 ""
|
||||||
|
"step_02.tex" 1778074524.52004 9161 30219f0c68c4ae118067f27c09a123fb ""
|
||||||
(generated)
|
(generated)
|
||||||
"main.aux"
|
"main.aux"
|
||||||
"main.log"
|
"main.log"
|
||||||
|
|||||||
@@ -261,6 +261,9 @@ INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/fira/FiraMono-Regular-tosf-
|
|||||||
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/fira/FiraMono-Bold-tosf-t1.tfm
|
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/fira/FiraMono-Bold-tosf-t1.tfm
|
||||||
INPUT /usr/share/texlive/texmf-dist/fonts/vf/public/fira/FiraMono-Bold-tosf-t1.vf
|
INPUT /usr/share/texlive/texmf-dist/fonts/vf/public/fira/FiraMono-Bold-tosf-t1.vf
|
||||||
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/fira/FiraMono-Bold-tosf-t1--base.tfm
|
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/fira/FiraMono-Bold-tosf-t1--base.tfm
|
||||||
|
INPUT ./step_02.tex
|
||||||
|
INPUT ./step_02.tex
|
||||||
|
INPUT step_02.tex
|
||||||
INPUT main.aux
|
INPUT main.aux
|
||||||
INPUT ./main.out
|
INPUT ./main.out
|
||||||
INPUT ./main.out
|
INPUT ./main.out
|
||||||
|
|||||||
+56
-13
@@ -1,4 +1,4 @@
|
|||||||
This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023/Debian) (preloaded format=pdflatex 2026.4.22) 6 MAY 2026 15:28
|
This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023/Debian) (preloaded format=pdflatex 2026.4.22) 6 MAY 2026 15:35
|
||||||
entering extended mode
|
entering extended mode
|
||||||
restricted \write18 enabled.
|
restricted \write18 enabled.
|
||||||
file:line:error style messages enabled.
|
file:line:error style messages enabled.
|
||||||
@@ -666,7 +666,50 @@ LaTeX Font Info: Font shape `T1/FiraMono-TOsF/bold/n' will be
|
|||||||
|
|
||||||
Package Listings Warning: Text dropped after begin of listing on input line 221.
|
Package Listings Warning: Text dropped after begin of listing on input line 221.
|
||||||
|
|
||||||
[6]) [7] (./main.aux)
|
[6]) (./step_02.tex [7]
|
||||||
|
Underfull \hbox (badness 10000) in paragraph at lines 63--64
|
||||||
|
[]|\T1/FiraSans-OsF/regular/n/12 (+20) Unser \T1/FiraSans-OsF/bold/n/12 (+20) ein-zi-ger Ver-wal-
|
||||||
|
[]
|
||||||
|
|
||||||
|
|
||||||
|
Underfull \hbox (badness 2961) in paragraph at lines 63--64
|
||||||
|
\T1/FiraSans-OsF/bold/n/12 (+20) tungs-zu-gang\T1/FiraSans-OsF/regular/n/12 (+20) . Oh-ne Port
|
||||||
|
[]
|
||||||
|
|
||||||
|
|
||||||
|
Underfull \hbox (badness 10000) in paragraph at lines 65--66
|
||||||
|
[]|\T1/FiraSans-OsF/bold/n/12 (+20) Verschlüsselte Web-sei-
|
||||||
|
[]
|
||||||
|
|
||||||
|
|
||||||
|
Underfull \hbox (badness 10000) in paragraph at lines 65--66
|
||||||
|
\T1/FiraSans-OsF/bold/n/12 (+20) ten\T1/FiraSans-OsF/regular/n/12 (+20) . Seit 2018 Pflicht
|
||||||
|
[]
|
||||||
|
|
||||||
|
|
||||||
|
Underfull \hbox (badness 5147) in paragraph at lines 65--66
|
||||||
|
\T1/FiraSans-OsF/regular/n/12 (+20) für mo-der-ne Web-Apps!
|
||||||
|
[]
|
||||||
|
|
||||||
|
|
||||||
|
Underfull \hbox (badness 4303) in paragraph at lines 65--66
|
||||||
|
\T1/FiraSans-OsF/regular/n/12 (+20) Oh-ne HTT-PS ver-wei-gern
|
||||||
|
[]
|
||||||
|
|
||||||
|
|
||||||
|
Underfull \hbox (badness 3612) in paragraph at lines 65--66
|
||||||
|
\T1/FiraSans-OsF/regular/n/12 (+20) Brow-ser Funk-tio-nen wie
|
||||||
|
[]
|
||||||
|
|
||||||
|
|
||||||
|
LaTeX Warning: `h' float specifier changed to `ht'.
|
||||||
|
|
||||||
|
[8]
|
||||||
|
Overfull \hbox (3.891pt too wide) in paragraph at lines 77--78
|
||||||
|
[]\T1/FiraSans-OsF/regular/n/12 (-20) HTTP-Verbindungen kön-nen von An-grei-fern ver-än-dert wer-den (Man-in-the-Middle)
|
||||||
|
[]
|
||||||
|
|
||||||
|
[9] [10]) [11] (./main.aux)
|
||||||
***********
|
***********
|
||||||
LaTeX2e <2023-11-01> patch level 1
|
LaTeX2e <2023-11-01> patch level 1
|
||||||
L3 programming layer <2024-01-22>
|
L3 programming layer <2024-01-22>
|
||||||
@@ -675,18 +718,18 @@ Package rerunfilecheck Info: File `main.out' has not changed.
|
|||||||
(rerunfilecheck) Checksum: D41D8CD98F00B204E9800998ECF8427E;0.
|
(rerunfilecheck) Checksum: D41D8CD98F00B204E9800998ECF8427E;0.
|
||||||
)
|
)
|
||||||
Here is how much of TeX's memory you used:
|
Here is how much of TeX's memory you used:
|
||||||
19152 strings out of 474222
|
19308 strings out of 474222
|
||||||
332887 string characters out of 5748733
|
335876 string characters out of 5748733
|
||||||
1999975 words of memory out of 5000000
|
2134975 words of memory out of 5000000
|
||||||
40979 multiletter control sequences out of 15000+600000
|
41036 multiletter control sequences out of 15000+600000
|
||||||
680488 words of font info for 145 fonts, out of 8000000 for 9000
|
686653 words of font info for 181 fonts, out of 8000000 for 9000
|
||||||
1141 hyphenation exceptions out of 8191
|
1141 hyphenation exceptions out of 8191
|
||||||
108i,8n,107p,10941b,2145s stack positions out of 10000i,1000n,20000p,200000b,200000s
|
108i,10n,107p,10941b,2145s stack positions out of 10000i,1000n,20000p,200000b,200000s
|
||||||
</usr/share/texlive/texmf-dist/fonts/type1/public/fira/FiraMono-Bold.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/fira/FiraMono-Regular.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/fira/FiraSans-Bold.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/fira/FiraSans-Regular.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy10.pfb>
|
</usr/share/texlive/texmf-dist/fonts/type1/public/fira/FiraMono-Bold.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/fira/FiraMono-Regular.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/fira/FiraSans-Bold.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/fira/FiraSans-Regular.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy10.pfb>
|
||||||
Output written on main.pdf (7 pages, 203809 bytes).
|
Output written on main.pdf (11 pages, 219584 bytes).
|
||||||
PDF statistics:
|
PDF statistics:
|
||||||
185 PDF objects out of 1000 (max. 8388607)
|
292 PDF objects out of 1000 (max. 8388607)
|
||||||
163 compressed objects within 2 object streams
|
265 compressed objects within 3 object streams
|
||||||
73 named destinations out of 1000 (max. 500000)
|
115 named destinations out of 1000 (max. 500000)
|
||||||
44609 words of extra memory for PDF output out of 51595 (max. 10000000)
|
44697 words of extra memory for PDF output out of 51595 (max. 10000000)
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -244,6 +244,7 @@
|
|||||||
% KAPITEL EINBINDEN
|
% KAPITEL EINBINDEN
|
||||||
% ============================================
|
% ============================================
|
||||||
\input{step_01.tex}
|
\input{step_01.tex}
|
||||||
|
\input{step_02.tex}
|
||||||
|
|
||||||
% Weitere Kapitel folgen hier:
|
% Weitere Kapitel folgen hier:
|
||||||
% \input{step_02.tex}
|
% \input{step_02.tex}
|
||||||
|
|||||||
@@ -7,4 +7,15 @@
|
|||||||
\contentsline {subsection}{\numberline {1.5}Schritt 5: SSH-Timeout auf 20 Minuten}{6}{subsection.1.5}%
|
\contentsline {subsection}{\numberline {1.5}Schritt 5: SSH-Timeout auf 20 Minuten}{6}{subsection.1.5}%
|
||||||
\contentsline {subsection}{\numberline {1.6}Schritt 6: Fail2Ban (Bruteforce-Schutz)}{6}{subsection.1.6}%
|
\contentsline {subsection}{\numberline {1.6}Schritt 6: Fail2Ban (Bruteforce-Schutz)}{6}{subsection.1.6}%
|
||||||
\contentsline {subsection}{\numberline {1.7}Zusammenfassung}{7}{subsection.1.7}%
|
\contentsline {subsection}{\numberline {1.7}Zusammenfassung}{7}{subsection.1.7}%
|
||||||
|
\contentsline {section}{\numberline {2}Firewall mit UFW einrichten}{7}{section.2}%
|
||||||
|
\contentsline {subsection}{\numberline {2.1}Was ist eine Firewall und warum brauchen wir sie?}{8}{subsection.2.1}%
|
||||||
|
\contentsline {subsection}{\numberline {2.2}Die 65.535 Ports: Ein kurzer Überblick}{8}{subsection.2.2}%
|
||||||
|
\contentsline {subsection}{\numberline {2.3}Die drei Ports, die wir öffnen}{8}{subsection.2.3}%
|
||||||
|
\contentsline {subsection}{\numberline {2.4}Warum HTTPS für PWAs Pflicht ist}{8}{subsection.2.4}%
|
||||||
|
\contentsline {subsection}{\numberline {2.5}Durchführung}{9}{subsection.2.5}%
|
||||||
|
\contentsline {subsubsection}{\numberline {2.5.1}Standardrichtlinien setzen}{9}{subsubsection.2.5.1}%
|
||||||
|
\contentsline {subsubsection}{\numberline {2.5.2}Benötigte Ports öffnen}{10}{subsubsection.2.5.2}%
|
||||||
|
\contentsline {subsubsection}{\numberline {2.5.3}Firewall aktivieren}{10}{subsubsection.2.5.3}%
|
||||||
|
\contentsline {subsubsection}{\numberline {2.5.4}Konfiguration überprüfen}{11}{subsubsection.2.5.4}%
|
||||||
|
\contentsline {subsection}{\numberline {2.6}Zusammenfassung}{11}{subsection.2.6}%
|
||||||
\providecommand \tocbasic@end@toc@file {}\tocbasic@end@toc@file
|
\providecommand \tocbasic@end@toc@file {}\tocbasic@end@toc@file
|
||||||
|
|||||||
@@ -0,0 +1,191 @@
|
|||||||
|
% ============================================
|
||||||
|
% STEP 02: FIREWALL MIT UFW
|
||||||
|
% ============================================
|
||||||
|
|
||||||
|
\section{Firewall mit UFW einrichten}
|
||||||
|
\label{sec:step02}
|
||||||
|
|
||||||
|
In diesem Schritt konfigurieren wir die Firewall des Servers mit \textbf{UFW} (Uncomplicated Firewall). UFW ist eine benutzerfreundliche Schnittstelle für \texttt{iptables}, die seit Ubuntu 8.04 standardmäßig installiert ist.
|
||||||
|
|
||||||
|
\subsection{Was ist eine Firewall und warum brauchen wir sie?}
|
||||||
|
|
||||||
|
Eine Firewall ist wie ein \textbf{Türsteher vor einem Club}: Sie entscheidet, welche Datenpakete (Gäste) hereinkommen und welche draußen bleiben. Ohne Firewall steht der Server "nackt" im Internet und jeder kann an jede Tür (Port) klopfen.
|
||||||
|
|
||||||
|
\textbf{Das Prinzip der minimalen Angriffsfläche:}
|
||||||
|
\begin{itemize}
|
||||||
|
\item Jeder offene Port ist eine potenzielle \textbf{Eintrittspforte} für Angreifer
|
||||||
|
\item Je weniger Ports offen sind, desto weniger Möglichkeiten gibt es für einen Angriff
|
||||||
|
\item Standard-Dienste haben oft \textbf{bekannte Sicherheitslücken} – selbst wenn wir sie nicht aktiv nutzen
|
||||||
|
\end{itemize}
|
||||||
|
|
||||||
|
\subsection{Die 65.535 Ports: Ein kurzer Überblick}
|
||||||
|
|
||||||
|
Ein Server hat 65.535 TCP-Ports und 65.535 UDP-Ports. Jeder Netzwerkdienst lauscht auf einem bestimmten Port. Hier sind die bekanntesten:
|
||||||
|
|
||||||
|
\begin{table}[h]
|
||||||
|
\centering
|
||||||
|
\caption{Bekannte Ports und ihre Dienste}
|
||||||
|
\begin{tabular}{@{}cll@{}}
|
||||||
|
\toprule
|
||||||
|
\textbf{Port} & \textbf{Dienst} & \textbf{Risiko/Bemerkung} \\
|
||||||
|
\midrule
|
||||||
|
21 & FTP & Uralt, Passwörter im Klartext -- niemals offen lassen \\
|
||||||
|
22 & SSH & Unser Verwaltungszugang -- MUSS offen sein \\
|
||||||
|
23 & Telnet & Wie SSH, aber unverschlüsselt -- Todesurteil für Server \\
|
||||||
|
25 & SMTP & Mail-Versand -- Angreifer könnten Spam verschicken \\
|
||||||
|
53 & DNS & Namensauflösung -- Ziel für DDoS-Angriffe \\
|
||||||
|
80 & HTTP & Standard-Webport -- für unsere Fitness-App \\
|
||||||
|
110 & POP3 & E-Mail-Abruf -- veraltet, unsicher \\
|
||||||
|
143 & IMAP & E-Mail-Abruf -- veraltet \\
|
||||||
|
443 & HTTPS & Verschlüsselter Webport -- PFLICHT für PWAs! \\
|
||||||
|
3306 & MySQL & Datenbank -- beliebtes Bruteforce-Ziel \\
|
||||||
|
5432 & PostgreSQL & Datenbank -- ebenso populär bei Angreifern \\
|
||||||
|
6379 & Redis & Oft ohne Passwort vorkonfiguriert -- sehr gefährlich \\
|
||||||
|
8080 & HTTP-Alt & Häufig für Entwicklertools mit schwacher Absicherung \\
|
||||||
|
27017& MongoDB & Bekannt für katastrophale Standardkonfigurationen \\
|
||||||
|
\bottomrule
|
||||||
|
\end{tabular}
|
||||||
|
\end{table}
|
||||||
|
|
||||||
|
\textbf{Merksatz:} Alles, was du nicht explizit brauchst, wird blockiert. Das ist keine Paranoia, sondern Best Practice im Server-Management.
|
||||||
|
|
||||||
|
\subsection{Die drei Ports, die wir öffnen}
|
||||||
|
|
||||||
|
Wir öffnen nur drei Ports – das absolute Minimum für einen Webserver:
|
||||||
|
|
||||||
|
\begin{table}[h]
|
||||||
|
\centering
|
||||||
|
\caption{Geöffnete Ports und ihre Begründung}
|
||||||
|
\begin{tabular}{@{}clp{5cm}@{}}
|
||||||
|
\toprule
|
||||||
|
\textbf{Port} & \textbf{Dienst} & \textbf{Warum offen?} \\
|
||||||
|
\midrule
|
||||||
|
22 & SSH & Unser \textbf{einziger Verwaltungszugang}. Ohne Port 22 könnten wir den Server nicht mehr fernsteuern -- wir wären ausgesperrt. \\
|
||||||
|
80 & HTTP & \textbf{Standard-Webport} für alle Browser. Wenn jemand deine Domain aufruft, landet er zuerst hier. Leitet später automatisch auf HTTPS (Port 443) um. \\
|
||||||
|
443 & HTTPS & \textbf{Verschlüsselte Webseiten}. Seit 2018 Pflicht für moderne Web-Apps! Ohne HTTPS verweigern Browser Funktionen wie PWA-Installation, Kamera-Zugriff oder Standort. \\
|
||||||
|
\bottomrule
|
||||||
|
\end{tabular}
|
||||||
|
\end{table}
|
||||||
|
|
||||||
|
\subsection{Warum HTTPS für PWAs Pflicht ist}
|
||||||
|
|
||||||
|
Eine Progressive Web App (PWA) \textbf{kann ohne HTTPS nicht installiert werden}. Das ist eine Sicherheitsanforderung von Google und Apple:
|
||||||
|
|
||||||
|
\begin{itemize}
|
||||||
|
\item Der \textbf{Service Worker} (das Herzstück einer PWA) benötigt zwingend HTTPS
|
||||||
|
\item Nur so kann der Browser garantieren, dass die App nicht manipuliert wurde
|
||||||
|
\item HTTP-Verbindungen können von Angreifern verändert werden (Man-in-the-Middle)
|
||||||
|
\end{itemize}
|
||||||
|
|
||||||
|
\textbf{Praxis-Beispiel:} Wenn du \texttt{http://deine-domain.de} aufrufst und dort die PWA installieren willst, verweigert Chrome die Installation. Erst mit \texttt{https://deine-domain.de} und einem gültigen SSL-Zertifikat funktioniert es.
|
||||||
|
|
||||||
|
\subsection{Durchführung}
|
||||||
|
|
||||||
|
\subsubsection{Standardrichtlinien setzen}
|
||||||
|
|
||||||
|
Zuerst definieren wir die grundlegenden Regeln: Alles Eingehende wird blockiert, alles Ausgehende erlaubt.
|
||||||
|
|
||||||
|
\textbf{Auf dem Server:}
|
||||||
|
|
||||||
|
\begin{lstlisting}[language=Bash, caption={Firewall-Standardregeln definieren}]
|
||||||
|
ufw default deny incoming
|
||||||
|
ufw default allow outgoing
|
||||||
|
\end{lstlisting}
|
||||||
|
|
||||||
|
\textbf{Erklärung der Befehle:}
|
||||||
|
\begin{itemize}
|
||||||
|
\item \texttt{ufw} -- das Firewall-Programm (Uncomplicated Firewall)
|
||||||
|
\item \texttt{default} -- setzt die Standardregel für alle Ports, die nicht explizit konfiguriert sind
|
||||||
|
\item \texttt{deny incoming} -- alle eingehenden Verbindungen werden \textbf{abgelehnt} (geblockt)
|
||||||
|
\item \texttt{allow outgoing} -- alle ausgehenden Verbindungen sind \textbf{erlaubt} (Server kann selbst ins Internet)
|
||||||
|
\end{itemize}
|
||||||
|
|
||||||
|
\textbf{Warum outgoing erlauben?} Der Server muss Updates herunterladen können (\texttt{apt update}), auf externe APIs zugreifen und im Internet kommunizieren. Das sind alles ausgehende Verbindungen -- die der Server selbst initiiert.
|
||||||
|
|
||||||
|
\subsubsection{Benötigte Ports öffnen}
|
||||||
|
|
||||||
|
Jetzt geben wir gezielt die drei Ports frei, die von außen erreichbar sein sollen.
|
||||||
|
|
||||||
|
\begin{lstlisting}[language=Bash, caption={Ports 22, 80, 443 für TCP freigeben}]
|
||||||
|
ufw allow 22/tcp
|
||||||
|
ufw allow 80/tcp
|
||||||
|
ufw allow 443/tcp
|
||||||
|
\end{lstlisting}
|
||||||
|
|
||||||
|
\textbf{Erklärung der Befehle:}
|
||||||
|
\begin{itemize}
|
||||||
|
\item \texttt{allow} -- dieser Port wird geöffnet
|
||||||
|
\item \texttt{22/tcp} -- Port 22, nur TCP-Protokoll (nicht UDP)
|
||||||
|
\item \texttt{80/tcp} -- Port 80 (HTTP), nur TCP
|
||||||
|
\item \texttt{443/tcp} -- Port 443 (HTTPS), nur TCP
|
||||||
|
\end{itemize}
|
||||||
|
|
||||||
|
\textbf{Warum nur TCP?} SSH, HTTP und HTTPS verwenden ausschließlich das TCP-Protokoll. UDP wird von diesen Diensten nicht benötigt. Würden wir nur \texttt{ufw allow 80} (ohne \texttt{/tcp}) schreiben, wäre auch UDP offen -- unnötige Angriffsfläche.
|
||||||
|
|
||||||
|
\subsubsection{Firewall aktivieren}
|
||||||
|
|
||||||
|
Die Firewall wurde bisher nur konfiguriert, ist aber noch nicht aktiv. Erst mit dem Enable-Befehl greifen die Regeln.
|
||||||
|
|
||||||
|
\begin{lstlisting}[language=Bash, caption={Firewall aktivieren}]
|
||||||
|
ufw --force enable
|
||||||
|
\end{lstlisting}
|
||||||
|
|
||||||
|
\textbf{Erklärung:}
|
||||||
|
\begin{itemize}
|
||||||
|
\item \texttt{enable} -- schaltet die Firewall ein
|
||||||
|
\item \texttt{--force} -- überspringt die Sicherheitsabfrage ("Bist du sicher?") und führt den Befehl direkt aus
|
||||||
|
\end{itemize}
|
||||||
|
|
||||||
|
\textbf{Achtung:} Wenn du Port 22 vergessen hättest, wärst du jetzt vom Server ausgesperrt! Die Firewall würde deine aktuelle SSH-Verbindung zwar nicht sofort trennen, aber ein erneuter Login wäre unmöglich. Deshalb prüfen wir im nächsten Schritt die Konfiguration.
|
||||||
|
|
||||||
|
\subsubsection{Konfiguration überprüfen}
|
||||||
|
|
||||||
|
\begin{lstlisting}[language=Bash, caption={Firewall-Status mit Details anzeigen}]
|
||||||
|
ufw status verbose
|
||||||
|
\end{lstlisting}
|
||||||
|
|
||||||
|
\textbf{Erklärung:}
|
||||||
|
\begin{itemize}
|
||||||
|
\item \texttt{status} -- zeigt an, ob die Firewall aktiv ist und welche Regeln gelten
|
||||||
|
\item \texttt{verbose} -- erweiterte Ausgabe mit zusätzlichen Details wie Logging-Einstellungen und Standardrichtlinien
|
||||||
|
\end{itemize}
|
||||||
|
|
||||||
|
Die erwartete Ausgabe:
|
||||||
|
|
||||||
|
\begin{lstlisting}[language=Bash, caption={Erwartete Firewall-Ausgabe (gekürzt)}]
|
||||||
|
Status: active
|
||||||
|
Logging: on (low)
|
||||||
|
Default: deny (incoming), allow (outgoing), disabled (routed)
|
||||||
|
New profiles: skip
|
||||||
|
|
||||||
|
To Action From
|
||||||
|
-- ------ ----
|
||||||
|
22/tcp ALLOW IN Anywhere
|
||||||
|
80/tcp ALLOW IN Anywhere
|
||||||
|
443/tcp ALLOW IN Anywhere
|
||||||
|
22/tcp (v6) ALLOW IN Anywhere (v6)
|
||||||
|
80/tcp (v6) ALLOW IN Anywhere (v6)
|
||||||
|
443/tcp (v6) ALLOW IN Anywhere (v6)
|
||||||
|
\end{lstlisting}
|
||||||
|
|
||||||
|
\textbf{Wichtige Details der Ausgabe:}
|
||||||
|
\begin{itemize}
|
||||||
|
\item \texttt{Status: active} -- die Firewall läuft und blockt unerwünschten Traffic
|
||||||
|
\item \texttt{Default: deny (incoming)} -- alle nicht explizit erlaubten eingehenden Verbindungen werden geblockt
|
||||||
|
\item \texttt{Anywhere} -- diese Ports sind von \textbf{jeder} IP-Adresse aus erreichbar (für Webseiten notwendig)
|
||||||
|
\item \texttt{(v6)} -- die Regeln gelten identisch für IPv6, sodass auch moderne Netzwerke geschützt sind
|
||||||
|
\end{itemize}
|
||||||
|
|
||||||
|
\subsection{Zusammenfassung}
|
||||||
|
|
||||||
|
Nach diesem Schritt ist die Firewall aktiv und schützt den Server:
|
||||||
|
|
||||||
|
\begin{itemize}
|
||||||
|
\item \textbf{65.532 Ports sind dicht} -- nur 3 sind offen
|
||||||
|
\item \textbf{SSH} (22) bleibt als einziger Verwaltungszugang offen
|
||||||
|
\item \textbf{HTTP/HTTPS} (80/443) sind für die spätere Web-App vorbereitet
|
||||||
|
\item \textbf{IPv4 und IPv6} werden beide geschützt
|
||||||
|
\item Die Firewall startet automatisch bei jedem Server-Neustart
|
||||||
|
\end{itemize}
|
||||||
|
|
||||||
|
\textbf{Praxis-Tipp:} Mit dem Befehl \texttt{ufw status numbered} kannst du jederzeit alle Regeln mit Nummern anzeigen. Eine einzelne Regel löschst du dann mit \texttt{ufw delete [Nummer]}.
|
||||||
Reference in New Issue
Block a user