added iptables rules

This commit is contained in:
Twoje Imię Nazwisko 2025-05-22 09:35:19 +02:00
parent 13021a85d0
commit c31c8aa5c0
4 changed files with 47 additions and 34 deletions

View File

@ -3,16 +3,17 @@
\@writefile{toc}{\contentsline {section}{\numberline {2}Prerequisites}{1}{}\protected@file@percent } \@writefile{toc}{\contentsline {section}{\numberline {2}Prerequisites}{1}{}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {3}Step-by-Step Configuration}{1}{}\protected@file@percent } \@writefile{toc}{\contentsline {section}{\numberline {3}Step-by-Step Configuration}{1}{}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {3.1}Creating and Setting Up the Incus Container}{1}{}\protected@file@percent } \@writefile{toc}{\contentsline {subsection}{\numberline {3.1}Creating and Setting Up the Incus Container}{1}{}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {3.2}Installing Additional Packages}{1}{}\protected@file@percent } \@writefile{toc}{\contentsline {subsection}{\numberline {3.2}Firewall Configuration}{2}{}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {3.3}Configuring Users and Permissions}{2}{}\protected@file@percent } \@writefile{toc}{\contentsline {subsection}{\numberline {3.3}Installing Additional Packages}{2}{}\protected@file@percent }
\@writefile{toc}{\contentsline {subsubsection}{\numberline {3.3.1}Changing the Root Password}{2}{}\protected@file@percent } \@writefile{toc}{\contentsline {subsection}{\numberline {3.4}Configuring Users and Permissions}{2}{}\protected@file@percent }
\@writefile{toc}{\contentsline {subsubsection}{\numberline {3.3.2}Adding a New User}{2}{}\protected@file@percent } \@writefile{toc}{\contentsline {subsubsection}{\numberline {3.4.1}Changing the Root Password}{2}{}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {3.4}Accessing the Container}{2}{}\protected@file@percent } \@writefile{toc}{\contentsline {subsubsection}{\numberline {3.4.2}Adding a New User}{2}{}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {3.5}Installing dnsmasq}{2}{}\protected@file@percent } \@writefile{toc}{\contentsline {subsection}{\numberline {3.5}Accessing the Container}{2}{}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {3.6}Configuring the Network with Netplan}{2}{}\protected@file@percent } \@writefile{toc}{\contentsline {subsection}{\numberline {3.6}Installing dnsmasq}{3}{}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {3.7}Configuring dnsmasq}{3}{}\protected@file@percent } \@writefile{toc}{\contentsline {subsection}{\numberline {3.7}Configuring the Network with Netplan}{3}{}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {3.8}Starting and Enabling dnsmasq}{4}{}\protected@file@percent } \@writefile{toc}{\contentsline {subsection}{\numberline {3.8}Configuring dnsmasq}{3}{}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {3.9}Testing the Configuration}{4}{}\protected@file@percent } \@writefile{toc}{\contentsline {subsection}{\numberline {3.9}Starting and Enabling dnsmasq}{4}{}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {3.10}Testing the Configuration}{4}{}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {4}Troubleshooting}{4}{}\protected@file@percent } \@writefile{toc}{\contentsline {section}{\numberline {4}Troubleshooting}{4}{}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {5}Conclusion}{4}{}\protected@file@percent } \@writefile{toc}{\contentsline {section}{\numberline {5}Conclusion}{5}{}\protected@file@percent }
\gdef \@abspage@last{4} \gdef \@abspage@last{5}

View File

@ -1,11 +1,11 @@
This is pdfTeX, Version 3.141592653-2.6-1.40.26 (TeX Live 2025/dev/Debian) (preloaded format=pdflatex 2024.12.27) 15 MAY 2025 09:28 This is pdfTeX, Version 3.141592653-2.6-1.40.26 (TeX Live 2025/dev/Debian) (preloaded format=pdflatex 2025.5.15) 22 MAY 2025 09:33
entering extended mode entering extended mode
restricted \write18 enabled. restricted \write18 enabled.
%&-line parsing enabled. %&-line parsing enabled.
**main **main
(./main.tex (./main.tex
LaTeX2e <2024-11-01> LaTeX2e <2024-11-01> patch level 2
L3 programming layer <2024-11-02> L3 programming layer <2025-01-18>
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls (/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2024/06/29 v1.4n Standard LaTeX document class Document Class: article 2024/06/29 v1.4n Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size12.clo (/usr/share/texlive/texmf-dist/tex/latex/base/size12.clo
@ -77,7 +77,7 @@ Package: keyval 2022/05/29 v1.15 key=value parser (DPC)
Package: ifvtex 2019/10/25 v1.7 ifvtex legacy package. Use iftex instead. Package: ifvtex 2019/10/25 v1.7 ifvtex legacy package. Use iftex instead.
(/usr/share/texlive/texmf-dist/tex/generic/iftex/iftex.sty (/usr/share/texlive/texmf-dist/tex/generic/iftex/iftex.sty
Package: iftex 2022/02/03 v1.0f TeX engine tests Package: iftex 2024/12/12 v1.0g TeX engine tests
)) ))
\Gm@cnth=\count270 \Gm@cnth=\count270
\Gm@cntv=\count271 \Gm@cntv=\count271
@ -155,7 +155,7 @@ Package: ltxcmds 2023-12-04 v1.26 LaTeX kernel commands for general use (HO)
Package: kvsetkeys 2022-10-05 v1.19 Key value parser (HO) Package: kvsetkeys 2022-10-05 v1.19 Key value parser (HO)
)) ))
(/usr/share/texlive/texmf-dist/tex/latex/etoolbox/etoolbox.sty (/usr/share/texlive/texmf-dist/tex/latex/etoolbox/etoolbox.sty
Package: etoolbox 2020/10/05 v2.5k e-TeX tools for LaTeX (JAW) Package: etoolbox 2025/02/11 v2.5l e-TeX tools for LaTeX (JAW)
\etb@tempcnta=\count281 \etb@tempcnta=\count281
)) ))
LaTeX Font Info: Trying to load font information for T1+lmr on input line 35 LaTeX Font Info: Trying to load font information for T1+lmr on input line 35
@ -298,40 +298,42 @@ dvips/lm/lm-ec.enc}{/usr/share/texmf/fonts/enc/dvips/lm/lm-ts1.enc}]
[2] [2]
LaTeX Font Info: Font shape `T1/lmtt/bx/n' in size <10.95> not available LaTeX Font Info: Font shape `T1/lmtt/bx/n' in size <10.95> not available
(Font) Font shape `T1/lmtt/b/n' tried instead on input line 117. (Font) Font shape `T1/lmtt/b/n' tried instead on input line 127.
Overfull \hbox (25.69144pt too wide) in paragraph at lines 164--165
[3]
Overfull \hbox (25.69144pt too wide) in paragraph at lines 174--175
[]\T1/lmtt/m/n/12 dhcp-range\T1/lmr/m/n/12 : De-fines the IP range for DHCP cli []\T1/lmtt/m/n/12 dhcp-range\T1/lmr/m/n/12 : De-fines the IP range for DHCP cli
ents (from 192.168.1.100 to 192.168.1.200, ents (from 192.168.1.100 to 192.168.1.200,
[] []
[3] [4]
[4] (./main.aux) [5] (./main.aux)
*********** ***********
LaTeX2e <2024-11-01> LaTeX2e <2024-11-01> patch level 2
L3 programming layer <2024-11-02> L3 programming layer <2025-01-18>
*********** ***********
) )
Here is how much of TeX's memory you used: Here is how much of TeX's memory you used:
5009 strings out of 473362 5025 strings out of 475178
72806 string characters out of 5723554 72920 string characters out of 5766539
842560 words of memory out of 5000000 841393 words of memory out of 5000000
28076 multiletter control sequences out of 15000+600000 27979 multiletter control sequences out of 15000+600000
598499 words of font info for 61 fonts, out of 8000000 for 9000 599267 words of font info for 61 fonts, out of 8000000 for 9000
1141 hyphenation exceptions out of 8191 14 hyphenation exceptions out of 8191
57i,6n,65p,493b,1661s stack positions out of 10000i,1000n,20000p,200000b,200000s 57i,5n,65p,493b,1247s stack positions out of 10000i,1000n,20000p,200000b,200000s
</usr/share/texmf/fonts/type1/public/lm/lmbx12.pfb></usr/share/texmf/fonts/ty </usr/share/texmf/fonts/type1/public/lm/lmbx12.pfb></usr/share/texmf/fonts/ty
pe1/public/lm/lmr12.pfb></usr/share/texmf/fonts/type1/public/lm/lmr17.pfb></usr pe1/public/lm/lmr12.pfb></usr/share/texmf/fonts/type1/public/lm/lmr17.pfb></usr
/share/texmf/fonts/type1/public/lm/lmr6.pfb></usr/share/texmf/fonts/type1/publi /share/texmf/fonts/type1/public/lm/lmr6.pfb></usr/share/texmf/fonts/type1/publi
c/lm/lmtk10.pfb></usr/share/texmf/fonts/type1/public/lm/lmtt10.pfb></usr/share/ c/lm/lmtk10.pfb></usr/share/texmf/fonts/type1/public/lm/lmtt10.pfb></usr/share/
texmf/fonts/type1/public/lm/lmtt12.pfb> texmf/fonts/type1/public/lm/lmtt12.pfb>
Output written on main.pdf (4 pages, 199974 bytes). Output written on main.pdf (5 pages, 203600 bytes).
PDF statistics: PDF statistics:
57 PDF objects out of 1000 (max. 8388607) 60 PDF objects out of 1000 (max. 8388607)
35 compressed objects within 1 object stream 37 compressed objects within 1 object stream
0 named destinations out of 1000 (max. 500000) 0 named destinations out of 1000 (max. 500000)
1 words of extra memory for PDF output out of 10000 (max. 10000000) 1 words of extra memory for PDF output out of 10000 (max. 10000000)

Binary file not shown.

View File

@ -64,6 +64,16 @@ incus start dnsmasq-container
\end{lstlisting} \end{lstlisting}
The \texttt{security.syscalls.intercept.mount}, \texttt{security.nesting}, and \texttt{security.privileged} settings are required for \texttt{dnsmasq} and Docker to function correctly in the container. The \texttt{security.syscalls.intercept.mount}, \texttt{security.nesting}, and \texttt{security.privileged} settings are required for \texttt{dnsmasq} and Docker to function correctly in the container.
% New subsection for firewall settings
\subsection{Firewall Configuration}
To allow traffic forwarding between the \texttt{incusbr0} bridge and the \texttt{wlo1} wireless interface, the following iptables rules are applied:
\begin{lstlisting}
sudo iptables -A FORWARD -i incusbr0 -o wlo1 -j ACCEPT
sudo iptables -A FORWARD -i wlo1 -o incusbr0 -m state --state RELATED,ESTABLISHED -j ACCEPT
\end{lstlisting}
\subsection{Installing Additional Packages} \subsection{Installing Additional Packages}
Install the necessary packages inside the container: Install the necessary packages inside the container:
\begin{lstlisting}[language=bash] \begin{lstlisting}[language=bash]