dnsmasq run ok
This commit is contained in:
parent
9e8db987c5
commit
c9da328783
18
doc/main.tex
18
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]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user