1
0
Fork 0
mirror of https://gitlab.com/netravnen/NetworkLabNotes.git synced 2024-11-23 19:17:54 +00:00

Compare commits

..

No commits in common. "d047e79d638041387c9ce85b249e386c7cea21e3" and "4d4185f46a01b835e64f788af04990c88ebe99da" have entirely different histories.

3 changed files with 24 additions and 87 deletions

View file

@ -7,69 +7,33 @@
\section{Kernel Upgrades}
LIST KERNELS ON /boot PARTITION
\begin{txt}
# LIST KERNELS ON /boot PARTITION
dpkg --list | grep linux-image
dpkg --list | grep linux-headers
\end{txt}
REMOVE SELECTED KERNEL VERSIONS FROM BOOT PARTITION
\begin{txt}
# REMOVE SELECTED KERNEL VERSIONS FROM BOOT PARTITION
sudo apt-get purge linux-image-4.4.0-{75,78,79}
sudo apt-get purge linux-image-extra-4.4.0-{75,78,79}
sudo apt-get purge linux-headers-4.4.0-{75,78,79}
\end{txt}
or alternatively
or
\begin{txt}
sudo apt autoremove [-f]
\end{txt}
My one-liner to remove old kernels (this also frees up disk space). https://askubuntu.com/a/254585
\begin{txt}
# My one-liner to remove old kernels (this also frees up disk space)
# https://askubuntu.com/a/254585
dpkg --list | grep linux-image | awk '{ print \$2 }' | sort -V | sed -n '/'`uname -r`'/q;p' | xargs sudo apt-get -y purge
\end{txt}
Remember to update grub2 configuration
\begin{txt}
# Remember to update grub2 configuration
sudo update-grub2
\end{txt}
\newpage
\subsection{Proxmox}
\subsubsection{Proxmox Migrations}
Move a LXC containers storage volumes to a different storage backend, both the boot disk, and additional disks. 1400 is here the example Container ID. And ''tank'' the target storage backend. We need to stop the container before we are allowed to migrate the storage volumes of the container. We start the container back up after finishing migrating the storage volumes.
\begin{txt}
sudo pct stop 1400 && \
sudo pct move-volume 1400 rootfs tank --delete && \
sudo pct move-volume 1400 mp0 tank --delete && \
sudo pct start 1400
\end{txt}
Using Remote Migrate to migrate an LXC container to a different Proxmox Node in another Proxmox Cluster. This is an offline migration, where we turn off the Container when migration. And restarting it with the new bridge setting afterwards. If the IPs have changed. This needs to be updated manually.
\begin{txt}
sudo pct remote-migrate \
$(
sudo pct list |
grep <LOOK FOR A SPECIFIC HOSTNAME> |
grep --perl-regex --only-matching '^\d+'
) \
<TARGET CONTAINER/VM ID> \
'apitoken=PVEAPIToken=<USER>@<METHOD>!<TOKEN NAME>=<TOKEN KEY>,host=<TARGET HOSTNAME OR IP>' \
--delete 1 \
--online 0 \
--restart 1 \
--target-bridge <TARGET BRIDGE NAME> \
--target-storage <TARGET STORAGE NAME>
\end{txt}

View file

@ -1,26 +0,0 @@
% !TeX TS-program =
% !TeX spellcheck = en_DK
% !TeX encoding = UTF-8
% !TeX root = ../main.tex
\chapter{PiHole}
\section{Whitelisting}
\subsection{Zoom Video Conferencing}
\begin{txt}
COMMENT='Zoom Video Conferencing';
pihole -w --comment "${COMMENT}" zoom.us --noreload && \
pihole -w --comment "${COMMENT}" app.zoom.us --noreload && \
pihole -w --comment "${COMMENT}" xmpp.zoom.us --noreload && \
pihole --white-regex --comment "${COMMENT}" '^zoom([\d\w]+)\.(cloud|\w{3})\.zoom\.us$' --noreload && \
pihole --white-regex --comment "${COMMENT}" '^\w{2}\d{1,4}\w{2}\d{1,4}\.zoom\.us$' --noreload && \
pihole --white-regex --comment "${COMMENT}" '^us\d{1,4}web\.zoom\.us$' --noreload && \
pihole --white-regex --comment "${COMMENT}" '^\w{1,4}\d{1,4}\.zoom\.us$' --noreload && \
pihole --white-regex --comment "${COMMENT}" '^\w{2}\d{1,4}\w{1,4}static\.zoom\.us$' --noreload && \
pihole --white-regex --comment "${COMMENT}" '\.cloud\.zoom\.us$' --noreload && \
pihole --white-regex --comment "${COMMENT}" '^\w+(\d{1,2})?\.\w{2}\.zoom\.us$' --noreload && \
pihole --white-regex --comment "${COMMENT}" '^\w{2}\d{1,3}images\.zoom\.us$'
\end{txt}

View file

@ -52,7 +52,6 @@
\include{chapter/voip}
\include{chapter/baseconf}
\include{chapter/linux}
\include{chapter/pihole}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %