Skip to content

🔐 Karlo Luiten

Think Evil, DO Good

🔐 Karlo Luiten

Think Evil, DO Good

  • Home
  • About me
    • About me
    • LinkedIn
    • Guide to Karlo
  • SELinux cheat sheet
  • CISSP Reference
  • Contact
Victron

Victron ESS console behind apache2 proxy

karlo November 25, 2023 0 Comments

# My cerbo is on 10.0.50.52 RewriteEngine on RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC] RewriteCond %{HTTP:CONNECTION} ^Upgrade$ [NC] RewriteRule .* ws://10.0.50.52:81%{REQUEST_URI} [P] <Location /websockify> ProxyPass ws://10.0.50.52:81 ProxyPassReverse ws://10.0.50.52:81 </Location> ProxyPreserveHost On ProxyPass…

CLI and tools

Python upgrade venv python binary/version

karlo September 15, 2023 0 Comments

python3 -m venv --upgrade /opt/venv/

CLI and tools Debian Linux

Git use different ssh key once

karlo September 12, 2023 0 Comments

export GIT_SSH_COMMAND="ssh -o IdentitiesOnly=yes -i ~/.ssh/id_rsa_blah" git push

Proxmox

TASK ERROR: zfs error: could not find any snapshots to destroy; check snapshot names.

karlo September 5, 2023 0 Comments

Try this: pct delsnapshot 2087 vzdump -force It will give an error but will remove snap from GUI

CLI and tools Linux

Upgrade postgresql cluster from 13 to 15

karlo June 29, 2023 0 Comments

apt list --installed | grep postg pg_dropcluster 15 main --stop pg_upgradecluster 13 main service postgresql@13-main stop service postgresql@15-main start pg_lsclusters pg_dropcluster 13 main apt-get purge postgresql-13 postgresql-client-13

Debian

Upgrade debian 11 to 12

karlo June 29, 2023 0 Comments

cat /etc/os-release; read -p enter; apt update; read -p enter; apt upgrade; apt full-upgrade; sed -i 's/bullseye/bookworm/g' /etc/apt/sources.list; grep -ir bull /etc/apt; read -p ok; apt clean; apt update; apt…

Uncategorized

Elasticsearch start fail on debian 11 after install from ES repos

karlo May 16, 2023 0 Comments

This guide helped me a lot: https://techviewleo.com/install-elastic-stack-elk-8-on-ubuntu/ After first installing with this parameter: export ES_SKIP_SET_KERNEL_PARAMETERS=true && apt-get install elasticsearch I then used the linked guide. Important parts: sudo vim /etc/elasticsearch/elasticsearch.yml…

CLI and tools Linux

Add a simple password to apache site

karlo May 11, 2023 0 Comments

To add a password to your site: apt install apache2-utils htpasswd -c /etc/apache2/.htpasswd user # Config <Directory "/var/www/html"> AuthType Basic AuthName "Restricted Content" AuthUserFile /etc/apache2/.htpasswd Require valid-user </Directory>

Linux

Linux: add user to existing group

karlo May 11, 2023 0 Comments

To add an existing user to an existing Linux group: usermod -a -G group user # Example usermod -a -G www-data django

Networking

Mikrotik RouterOS guest VLAN routed over ProtonVPN (2023)

karlo May 9, 2023 0 Comments

Get a wireguard config, it has a private key and peer information Add a new wireguard interface, I called it proton1. Use the private key from the config file. Add…

CLI and tools

SSH in for loop (consuming stdin / using file descriptor 3)

karlo May 7, 2023 0 Comments

Ever found yourself using a for/while loop using SSH in the loop, only to find out your loop only runs once? Your stdin is captured by ssh... This can be…

CLI and tools

Bash clear tmp files (for script) on exit (trap)

karlo May 7, 2023 0 Comments

TMP="$(mktemp -d)" trap 'rm -rf -- "$TMP"' EXIT

Uncategorized

Apache2 (apache) forward https headers

karlo May 3, 2023 0 Comments

RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME} RequestHeader set "X-Forwarded-SSL" expr=%{HTTPS}

Uncategorized

Postgres read long lines (wrap text)

karlo May 1, 2023 0 Comments

\pset format wrapped

Uncategorized

Install `strings` command in debian/linux

karlo April 30, 2023 0 Comments

That's a difficult one to search for. To get the strings command working in Debian 11 / Linux, for example in your bash scripts, install the binutils package!

Linux Networking

SSH jump host config

karlo April 8, 2023 0 Comments

My remote hosts are on srvXX.remote.com. I have a jump host jump.remote.com. I want to be able to type ssh srv42.remote.com and connect, without first having to ssh to jump.remote.com.…

Networking Proxmox

Wireguard site-to-site (proxmox to mikrotik/routeros)

karlo April 8, 2023 0 Comments

I wanted to connect my dedicated hetzner proxmox box ("remote") to my home IP. Networks: Home has 10.0.40.0/24 and 10.0.60.0/24 Remote has 10.0.101.0/24 At home I created on my mikrotik:…

Networking Proxmox

Masquerade ip forward for Proxmox on hetzner (single IP)

karlo April 7, 2023 0 Comments

This works for me: Install plain debian 11, install proxmox Screenshot IPs of interface Clear all IP data from existing/default interface Create Linux bridge with IP info Then open SSH…

Proxmox

Proxmox migrate to node outside of cluster

karlo April 7, 2023 0 Comments

qm remote-migrate <vmid> [<target-vmid>] <target-endpoint> --target-bridge <string> --target-storage <string> [OPTIONS] Migrate virtual machine to a remote cluster. Creates a new migration task. EXPERIMENTAL feature! <vmid>: <integer> (1 - N) The…

Proxmox

Fix “Cannot remove image, a guest with VMID ‘xxx’ exists!”

karlo April 7, 2023 0 Comments

Get this error? Cannot remove image, a guest with VMID '1070' exists!You can delete the image from the guest's hardware pane Then on your node/host, do pct rescan; qm rescan…

CLI and tools

Add Microsoft fonts (like Arial) to Nextcloud Office (Collabora)

karlo April 4, 2023 0 Comments

On Debian 11: apt install ttf-mscorefonts-installer -ydpkg-reconfigure fontconfig-configcoolconfig update-system-templatesystemctl restart coolwsd.service

Proxmox

Proxmox move progress (container/VM)

karlo March 26, 2023 0 Comments

Your proxmox will just tell you: 2023-03-26 10:31:50 Logical volume "vm-1070-disk-1" created. But what if you want to know the progress of the copy? In percentage maybe? On the source…

Proxmox

Proxmox move container/vm to different storage on different host

karlo March 26, 2023 0 Comments

Container: nohup pct migrate 1076 srv78 --target-storage LVMStore & Untested (VM): qm migrate 1076 srv78 -migration_network 10.0.0.0/24 -targetstorage SrvSSD -with-local-disks Does not want to move? You need to add the…

LineageOS

LineageOS recovery bootloop into Google firmware

karlo March 24, 2023 0 Comments

Don't follow the original guide ➜ ~ cd Downloads ➜ Downloads fastboot flash vendor_boot vendor_boot.img Sending 'vendor_boot_a' (65536 KB) OKAY [ 0.516s] Writing 'vendor_boot_a' OKAY [ 0.244s] Finished. Total time:…

Debian Uncategorized

Add new dmraid to debian11

karlo March 22, 2023 0 Comments

Note to self:

Linux

Nextcloud / php / apache no error for Internal Server Error

karlo March 19, 2023 0 Comments

I got this: Internal Server Error The server encountered an internal error and was unable to complete your request. Please contact the server administrator if this error reappears multiple times,…

Proxmox

Proxmox LXC container disk shrink

karlo March 19, 2023 0 Comments

Like this (LVM based) root@srv65:~# lvs | grep 1071 vm-1071-disk-0 BigStore -wi-a----- 64.00g root@srv65:~# e2fsck -fy /dev/mapper/BigStore-vm--1071--disk--0 e2fsck 1.46.5 (30-Dec-2021) Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking…

CLI and tools Linux

Friendly (ionice/nice) rsync on remote server

karlo March 17, 2023 0 Comments

Add --rsync-path="ionice -c 3 nice rsync" to your rsync command (on sending side) Friendly for both sender and receiver: ionice -c3 nice rsync --rsync-path="ionice -c 3 nice rsync"

Debian

LVM commands not found

karlo March 17, 2023 0 Comments

Getting this? bash: pvchange: command not found bash: pvck: command not found bash: pvcreate: command not found bash: pvdisplay: command not found bash: pvmove: command not found bash: pvs: command…

Networking

T-Mobile Thuis werkende SMTP 2023 (Fix Relay access denied)

karlo March 14, 2023 0 Comments

Ik kreeg de melding: Mar 14 04:21:48 srv14.domein.nl postfix/smtp[61178]: 2E7A92402A4: to=root@domein.nl, orig_to=root@srv14.domein.nl, relay=smtp.t-mobilethuis.nl[37.143.82.162]:25, delay=0.06, delays=0.01/0/0.04/0.01, dsn=5.7.1, status=bounced (host smtp.t-mobilethuis.nl[37.143.82.162] said: 554 5.7.1 root@domein.nl: Relay access denied (in reply to RCPT…

Posts navigation

1 2 … 12

Next Page »

Posts

  • Victron ESS console behind apache2 proxy November 25, 2023
  • Python upgrade venv python binary/version September 15, 2023
  • Git use different ssh key once September 12, 2023
  • TASK ERROR: zfs error: could not find any snapshots to destroy; check snapshot names. September 5, 2023
  • Upgrade postgresql cluster from 13 to 15 June 29, 2023
  • Upgrade debian 11 to 12 June 29, 2023
  • Elasticsearch start fail on debian 11 after install from ES repos May 16, 2023
  • Add a simple password to apache site May 11, 2023
  • Linux: add user to existing group May 11, 2023
  • Mikrotik RouterOS guest VLAN routed over ProtonVPN (2023) May 9, 2023
  • SSH in for loop (consuming stdin / using file descriptor 3) May 7, 2023
  • Bash clear tmp files (for script) on exit (trap) May 7, 2023
  • Apache2 (apache) forward https headers May 3, 2023
  • Postgres read long lines (wrap text) May 1, 2023
  • Install `strings` command in debian/linux April 30, 2023
  • SSH jump host config April 8, 2023
  • Wireguard site-to-site (proxmox to mikrotik/routeros) April 8, 2023
  • Masquerade ip forward for Proxmox on hetzner (single IP) April 7, 2023
  • Proxmox migrate to node outside of cluster April 7, 2023
  • Fix “Cannot remove image, a guest with VMID ‘xxx’ exists!” April 7, 2023

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Posts

Victron

Victron ESS console behind apache2 proxy

CLI and tools

Python upgrade venv python binary/version

CLI and tools Debian Linux

Git use different ssh key once

Proxmox

TASK ERROR: zfs error: could not find any snapshots to destroy; check snapshot names.

🔐 Karlo Luiten

Think Evil, DO Good

Copyright © All rights reserved | Blogus by Themeansar.