From c9da3287831aa7321f2f3d08912219700625d7b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Twoje=20Imi=C4=99=20Nazwisko?= Date: Thu, 22 May 2025 10:33:38 +0200 Subject: [PATCH] dnsmasq run ok --- doc/main.tex | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/doc/main.tex b/doc/main.tex index 50e2483..0e99ff3 100644 --- a/doc/main.tex +++ b/doc/main.tex @@ -126,13 +126,6 @@ This command: The script uses the \texttt{pyroute2} library to manage network interfaces and namespaces, and supports container types such as Incus, LXC, LXD, and Docker. Ensure the \texttt{dnsmasq-container} is running in Incus before executing the command. -\subsection{Installing dnsmasq} -Update the package list and install \texttt{dnsmasq}: -\begin{lstlisting}[language=bash] -incus exec dnsmasq-container -- apt update -incus exec dnsmasq-container -- apt install dnsmasq -y -\end{lstlisting} - \subsection{Configuring the Network with Netplan} Configure the container's network using Netplan to assign a static IP address. Create or edit the Netplan configuration file at \texttt{/etc/netplan/01-netcfg.yaml}: \begin{lstlisting}[language=bash] @@ -143,7 +136,7 @@ Add the following configuration: network: version: 2 ethernets: - eth0: + vB: dhcp4: no addresses: - 192.168.1.10/24 @@ -158,6 +151,15 @@ Apply the configuration: incus exec dnsmasq-container -- netplan apply \end{lstlisting} + +\subsection{Installing dnsmasq} +Update the package list and install \texttt{dnsmasq}: +\begin{lstlisting}[language=bash] +incus exec dnsmasq-container -- apt update +incus exec dnsmasq-container -- apt install dnsmasq -y +\end{lstlisting} + + \subsection{Configuring dnsmasq} Edit the \texttt{dnsmasq} configuration file at \texttt{/etc/dnsmasq.conf}: \begin{lstlisting}[language=bash]