Skip to main content

Primary links

  • Home
  • AI
  • Kubernetes
  • Incus
  • Ansible
  • Terraform
  • OpenStack
  • Virtualization
  • Linux
  • SmartHome
  • HowTo

Misc

  • Linux
  • Hardware
  • Programming
  • Databases
  • Multimedia
  • Windows

Cloud

  • OpenStack
  • cloud-config
  • nextcloud

Virtualization

  • Virtualization
  • Incus
  • Docker
  • KVM
  • Kubernetes
  • LXC
  • LXD
  • QEMU
  • VMware
  • VirtualBox
  • multipass
  • podman
  • vagrant
  • XEN

Network

  • DNS
  • Firewall
  • Linux
  • OpenvSwitch
  • SSL
  • VLAN
  • VPN
  • iPXE
  • namespaces
  • nmcli
  • tcpdump

Storage

  • CEPH
  • DRBD
  • LVM
  • S3
  • ZFS
  • btrfs

Automation / CI/CD

  • Install
  • Ansible
  • GitLab
  • LLM
  • Preseed
  • Puppet
  • Terraform
  • Ubuntu autoinstall

Monitoring / Visualisation

  • Grafana
  • Icinga
  • Prometheus
  • Monitoring
  • ELK
  • mermaid

Incus

OPTINAL: Uninstall LXD

snap remove lxd

Incus installation
https://github.com/zabbly/incus
https://linuxcontainers.org/incus/docs/main/installing/

curl -fsSL https://pkgs.zabbly.com/key.asc | gpg --show-keys --fingerprint

mkdir -p /etc/apt/keyrings
curl -fsSL https://pkgs.zabbly.com/key.asc -o /etc/apt/keyrings/zabbly.asc

# Add incus stable repository
sh -c 'cat < /etc/apt/sources.list.d/zabbly-incus-stable.sources
Enabled: yes
Types: deb
URIs: https://pkgs.zabbly.com/incus/stable
Suites: $(. /etc/os-release && echo ${VERSION_CODENAME})
Components: main
Architectures: $(dpkg --print-architecture)
Signed-By: /etc/apt/keyrings/zabbly.asc

EOF'

apt-get update
apt-get install -y incus bash-completion #incus-tools

# OPTIONAL: add default ubuntu user to incus group
sudo usermod -aG incus-admin ubuntu
newgrp incus-admin

# fixme
# incus completion fish

Prerequisits (ZFS filesystem)

# ZFS (optional)
sudo apt install -y zfsutils-linux
sudo lvcreate --name storage --size 100G ubuntu-vg
sudo zpool create rpool /dev/ubuntu-vg/storage
sudo zpool set autotrim=on rpool
sudo zfs create rpool/incus

Install Incus with Ansible

Install minikube

Install docker
http://www.panticz.de/docker

Install minikube
https://minikube.sigs.k8s.io/docs/start/

curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube_latest_$(dpkg --print-architecture).deb
sudo dpkg -i minikube_latest_*.deb
rm minikube_latest_*.deb

sudo usermod -aG docker $USER && newgrp docker

minikube start

minikube addons enable ingress

Install kubectl
https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/#install-using-native-package-management

curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.29/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg
echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.29/deb/ /' | sudo tee /etc/apt/sources.list.d/kubernetes.list
sudo apt-get update
sudo apt-get install -y kubectl

kubectl completion bash | sudo tee /etc/bash_completion.d/kubectl
source /etc/bash_completion.d/kubectl

echo "alias k=kubectl" >> ~/.bashrc
echo "complete -o default -F __start_kubectl k" >> ~/.bashrc

Test configuration

kubectl get all --all-namespaces -o wide

Install k9s
https://github.com/derailed/k9s/releases

K9S_VERSION=0.32.4
wget -q https://github.com/derailed/k9s/releases/download/v${K9S_VERSION}/k9s_linux_$(dpkg --print-architecture).deb -P /tmp/
sudo dpkg -i /tmp/k9s_linux_$(dpkg --print-architecture).deb
rm /tmp/k9s_linux_*.deb

Configure port forwad to minikube

network namespaces netns

preparation

ufw disable

create namespapce

ip netns add red
ip netns add blue

veth

ip link add veth-red type veth peer name veth-blue
ip link set veth-red netns red
ip link set veth-blue netns blue
ip -n red addr add 192.168.15.1 dev veth-red
ip -n blue addr add 192.168.15.2 dev veth-blue
ip -n red link set veth-red up
ip -n blue link set veth-blue up

# delete
ip -n  red link del veth-red

# show unattached veth
ip -c link show type veth

bride

# show unattached bride
ip link add v-net-0 type bridge
ip link set dev v-net-0 up

ip link add veth-red type veth peer name veth-red-br
ip link set veth-red netns red
ip -n red l set veth-red up

ip link add veth-blue type veth peer name veth-blue-br
ip link set veth-blue netns blue
ip -n blue l set veth-blue up

ip link set veth-red-br master v-net-0
ip -n red addr add 192.168.15.1/24 dev veth-red
ip l set veth-blue-br up

ip link set veth-blue-br master v-net-0
ip -n blue addr add 192.168.15.2/24 dev veth-blue
ip l set veth-red-br up

ip -c link show type bridge

forward

ip addr add 192.168.15.5/24 dev v-net-0
ip -n blue r add 192.168.178.0/24 via 192.168.15.5
iptables -t nat -A POSTROUTING -s 192.168.15.0/24 -j MASQUERADE
ip -n blue r add default via 192.168.15.5
iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination 192.168.15.2:80

Liinks
https://matthewarcus.wordpress.com/2018/02/04/veth-devices-network-namespaces-and-open-vswitch/

Ventoy ISO boot

Install
https://github.com/ventoy/Ventoy/releases/

URL=https://github.com/ventoy/Ventoy/releases/download/v1.1.09/ventoy-1.1.09-linux.tar.gz
DEV=/dev/sdX

wget ${URL} -qO /tmp/ventoy-linux.tar.gz
tar xzf /tmp/ventoy-linux.tar.gz -C /tmp/
chmod +x -R /tmp/ventoy-*/tool/x86_64
# sudo ln -s /usr/sbin/mkfs.exfat /usr/local/sbin/mkexfatfs
sudo /tmp/ventoy-*/Ventoy2Disk.sh -l -i ${DEV}

Copy ISOs

cp *.iso /media/*/Ventoy/

Links
https://www.ventoy.net/en/doc_start.html
https://netboot.xyz/docs/booting/iso

MultiBootUSB

DEVICE=/dev/sdb
VOLUME=MultiBootUSB

# create filesystem on usb pen
sudo mkfs.vfat -n ${VOLUME} ${DEVICE}1

# mount usb
mount ${DEVICE}1 /mnt/

# install grub2 on usb pen
grub-install --no-floppy --root-directory=/mnt ${DEVICE}

# create grub config
cat < /mnt/boot/grub/grub.cfg
menuentry "Ubuntu Live 11.04 64bit" {
        loopback loop /boot/iso/ubuntu-11.04-desktop-amd64.iso
        linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/boot/iso/ubuntu-11.04-desktop-amd64.iso noeject noprompt --
        initrd (loop)/casper/initrd.lz
}

menuentry "Ubuntu Live 9.10 32bit" {
 loopback loop /boot/iso/ubuntu-9.10-desktop-i386.iso
 linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/boot/iso/ubuntu-9.10-desktop-i386.iso noeject noprompt --
 initrd (loop)/casper/initrd.lz
}

menuentry "Ubuntu Live 9.10 64bit" {
 loopback loop /boot/iso/ubuntu-9.10-desktop-amd64.iso
 linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/boot/iso/ubuntu-9.10-desktop-amd64.iso noeject noprompt --
 initrd (loop)/casper/initrd.lz
}

menuentry "Grml small 2009.10" {
  loopback loop /boot/iso/grml-small_2009.10.iso
  linux (loop)/boot/grmlsmall/linux26 findiso=/boot/iso/grml-small_2009.10.iso apm=power-off lang=us vga=791 boot=live nomce noeject noprompt --
  initrd (loop)/boot/grmlsmall/initrd.gz
}

menuentry "tinycore" {
 loopback loop /boot/iso/tinycore_2.3.1.iso
 linux (loop)/boot/bzImage --
 initrd (loop)/boot/tinycore.gz
}

menuentry "Netinstall 32 preseed" {
  loopback loop /boot/iso/mini.iso
  linux (loop)/linux auto url=http://www.panticz.de/pxe/preseed/preseed.seed locale=en_US console-setup/layoutcode=de netcfg/choose_interface=eth0 debconf/priority=critical --
  initrd (loop)/initrd.gz
}

menuentry "debian-installer-amd64.iso" {
  loopback loop /boot/iso/debian-installer-amd64.iso
  linux (loop)/linux vga=normal --
  initrd (loop)/initrd.gz
}

menuentry "BackTrack 4" {
 linux /boot/bt4/boot/vmlinuz BOOT=casper boot=casper nopersistent rw vga=0x317 --
 initrd /boot/bt4/boot/initrd.gz
}

menuentry "Memory test (memtest86+)" {
 linux16 /boot/img/memtest86+.bin
}

menuentry "BackTrack ERR" {
 loopback loop /boot/iso/bt4-pre-final.iso
 linux (loop)/boot/vmlinuz find_iso/filename=/boot/iso/bt4-pre-final.iso BOOT=casper boot=casper nopersistent rw vga=0x317--
 initrd (loop)/boot/initrd.gz
}          

menuentry "XBMC ERR" {
 loopback loop /boot/iso/XBMCLive.iso

easytax

sudo apt install openjdk-19-jre

Download
https://msg-easytax.ch/ag/

wget https://msg-easytax.ch/ag/2022/EasyTax2022AG_linux_1_1.deb

LXD: Create X11 container

CONTAINER=x11

lxc remote add --protocol simplestreams ubuntu-minimal https://cloud-images.ubuntu.com/minimal/releases/

lxc launch ubuntu-minimal:22.04 ${CONTAINER}

lxc exec ${CONTAINER} -- sudo --login --user ubuntu
sudo apt update
sudo apt install -y x11-apps mesa-utils
exit

lxc config set ${CONTAINER} raw.idmap "both $UID 1000"

lxc restart ${CONTAINER}

lxc config device add ${CONTAINER} X0 disk path=/tmp/.X11-unix/X0 source=/tmp/.X11-unix/X0
lxc config device add ${CONTAINER} Xauthority disk path=/home/ubuntu/.Xauthority source=${XAUTHORITY}

Links
https://blog.simos.info/running-x11-software-in-lxd-containers/
https://blog.simos.info/how-to-run-teamviewer-in-lxd/
https://blog.simos.info/how-to-run-graphics-accelerated-gui-apps-in-lxd-containers-on-your-ubuntu-desktop/

Install vivaldi

wget -O - http://repo.vivaldi.com/stable/linux_signing_key.pub | sudo apt-key add -
sudo apt-add-repository -y 'deb [arch=amd64] https://repo.vivaldi.com/archive/deb/ stable main'
sudo apt update
sudo apt install -y vivaldi-stable

Install Brother P-Touch QL-500 / QL-550 / QL-560 / QL-570 under Ubuntu

wget https://raw.githubusercontent.com/panticz/installit/master/hardware/install.brother-ql-labelprinter.sh -O- | bash

sudo su

[ ! -d /usr/share/cups/model ] && mkdir /var/spool/lpd
[ ! -d /usr/share/cups/model ] && mkdir /usr/share/cups/model
#ln -s /etc/init.d/cups /etc/init.d/cupsys

# create outdated cupsys init script
cat < /etc/init.d/cupsys
#!/bin/bash

/etc/init.d/cups \$@
EOF
chmod a+x /etc/init.d/cupsys

cat < /var/lib/dpkg/info/ql570cupswrapper.list
./
./usr/
./usr/local/
./usr/local/Brother/
./usr/local/Brother/PTouch/
./usr/local/Brother/PTouch/ql570/
./usr/local/Brother/PTouch/ql570/cupswrapper/
./usr/local/Brother/PTouch/ql570/cupswrapper/cupswrapperql570pt1
./usr/local/Brother/PTouch/ql570/cupswrapper/brcupsconfpt1
EOF

mkdir -p /var/spool/lpd/ql570

wget -q https://download.brother.com/welcome/dlfp002168/ql550lpr-1.0.1-0.i386.deb -P /tmp
dpkg -i --force-all /tmp/ql5*lpr-*.i386.deb

wget -q https://download.brother.com/welcome/dlfp002171/ql550cupswrapper-1.0.1-0.i386.deb -P /tmp
dpkg -i --force-all /tmp/ql5*cupswrapper-*.i386.deb

# connect and power-on the printer

# delete default printer
lpadmin -x QL-570

# create new printer (example for QL-500)
lpadmin -p Brother_P-Touch -E -v usb://Brother/QL-500 -P /usr/share/cups/model/Brother/brother_ql550_printer_en.ppd \
  -o BrPriority=BrQuality \
  -o PageSize=29x90 \
  -o PageRegion=29x90 \
  -o ImageableArea=29x90 \
  -o PaperDimension=29x90

recreate printer

lpadmin -x QL-500
#lpadmin -p Brother_QL-500 -E -v usb://Brother/QL-500 -P /usr/share/cups/model/brql500.ppd

lpadmin -p Brother_38x90 -v socket://PRINTSERVER_IP:9100 -E -P /usr/share/cups/model/Brother/brother_ql570_printer_en.ppd -o PageSize=38x90 -o PageRegion=38x90 -o ImageableArea=38x90 -o PaperDimension=38x90

set Label to 38x90 mm

lpadmin -p Brother_38x90 -v usb://Brother/QL-500 -E -P /usr/share/cups/model/Brother/brother_ql570_printer_en.ppd -o PageSize=38x90 -o PageRegion=38x90 -o ImageableArea=38x90 -o PaperDimension=38x90 -o BrPriority=BrQuality -o orientation-requested-default=4

test

Create anyconnect VPN connection on command line with nmcli

Create connection

VPN_GATEWAY=vpn1.example.com
VPN_USER=foo
VPN_ROUTES=192.168.11.0/24

nmcli connection add \
    connection.id vpn1 \
    connection.type vpn \
    connection.permissions "user:${USER}" \
    ipv4.routes "${VPN_ROUTES}" \
    ipv4.ignore-auto-routes yes \
    vpn.service-type org.freedesktop.NetworkManager.openconnect \
    vpn.data "
        protocol = anyconnect,
        authtype = cert,
        gateway = ${VPN_GATEWAY},
        cacert = ${HOME}/vpn1/ca.pem,
        usercert = ${HOME}/vpn1/certificate.pem,
        userkey = ${HOME}/vpn1/priv.pem,
        cookie-flags = 2
    " \
    vpn.secrets "
        form:main:group_list=CLIENTGROUP,
        form:main:username=${VPN_USER},
        save_passwords=yes
    "

Start connection and enter password once

nmcli connection up vpn1

Debug

#journalctl -fxe NM_CONNECTION=8d5ec3cb-99c5-47ea-84e2-38174cd14702
journalctl -fxe -t NetworkManager

cat /etc/NetworkManager/system-connections/vpn1.nmconnection 
nmcli con show vpn1

Links
https://0xsys.blogspot.com/2019/06/configure-vpn-using-nmcli.html

Pagination

  • 1
  • Next page
linux
Profiles GitHub StackOverflow LinkedIn Xing
Contact Imprint
© panticz 2026

Cookie-Einstellungen

Diese Website nutzt eingebettete Inhalte von Drittanbietern (z.B. YouTube, SoundCloud). Beim Laden dieser Inhalte werden Daten an die jeweiligen Anbieter übermittelt. Datenverarbeitungserklärung