Cisco AP 2802i Autonomous Mobility Express conversion

e.g. for AIR-AP2802I-E-K9

reset AP via „hold mode button for >20 sec for full reset while connection power“

download firmware for Mobility Express for specific series (e.g. AIR-AP2800-K9-ME-8-10-190-0.tar )

setup tftp to serve file (e.g. on 10.0.0.2)

connect via terminal adapter with AP with default credentials: Cisco:Cisco

-> enable

capwap ap ip 10.0.0.42 255.255.255.0 10.0.0.2

check if set properly

show ip int br

then load firmware

ap-type mobility-express tftp://10.0.0.2/AIR-AP2800-K9-ME-8-10-190-0.tar

wait

follow initial setup on console

 

enable webinterface:

config network webmode enable

postgres cli upgrade / backup

switch to postgres user

sudo -u postgres -i

dump database

pg_dumpall > sql-dump

dump only specific tables

pg_dump --host localhost --port 5432 --username postgres --table oc_blubb dbname > /path/to/file

read file via

psql -f sql-dump

commands for cli:

List Databases:

postgres=# \l

Switch Database:

postgres=# \c nextcloud
You are now connected

List tables:

nextcloud=# \dt

 

analyse tasks:

SELECT * FROM pg_stat_activity;

 

esphome build on 64bit pi

fix from here: https://github.com/esphome/issues/issues/1386#issuecomment-1073117862

docker exec -it esphome bash

/usr/local/lib/python3.9/dist-packages/platformio/util.py

by adding

if arch == "aarch64":
        if platform.architecture()[0] == "32bit":
            arch = "armv7l"

in here:

def get_systype():
    type_ = platform.system().lower()
    arch = platform.machine().lower()
    if type_ == "windows" and "x86" in arch:
        arch = "amd64" if "64" in arch else "x86"
    if arch == "aarch64":
        if platform.architecture()[0] == "32bit":
            arch = "armv7l"
    return "%s_%s" % (type_, arch) if arch else type_

 

all-inkl php einstellungen ändern

Sie haben die Möglichkeit, diese Limits speziell für das Verzeichnis, in dem sich Ihre Webseite befindet, per .user.ini hochzusetzen. Legen Sie dazu in dem Verzeichnis der betreffenden Domain/Subdomain eine .user.ini Datei (falls noch nicht vorhanden) an und fügen Sie folgende Anweisungen hinzu.

 

upload_max_filesize=2048M
max_execution_time=7200
memory_limit=512M

 

TLS SSL: check TLS connection / cert Dates + TLS versions

Check gültigkeit:

openssl s_client -host ldap.server.de -port 636 2>/dev/null | openssl x509 -noout -dates

show cert + chain

openssl s_client -host ldap.server.de -port 636

 

show supported versions

nmap --script ssl-enum-ciphers -p 443 www.host.com

 

show Cert

nmap --script ssl-cert -p 25 smtp.host.com

 

LINUX: borg system backup

on debian:

apt install borgbackup

Client site:
Sytembackup using exclude dirs:

borg init -e repokey borg@backuphost.domain.de:/var/lib/backup/BACKUPREPO

 

#!/usr/bin/env bash

##
## Umgebungsvariablen
##

## set ssh key if needed
# export BORG_RSH="ssh -i /home/SOMEUSER/.ssh/id_ed25519"

## repository passphrase
export BORG_PASSPHRASE="SUPERSECRET"

## Host variables

LOG="/var/log/borg/backup.log"
BACKUP_USER="borg"
BACKUP_HOST="XXXBACKUP_SERVERXXX"
REPOSITORY_DIR="XXXLOCAL_HOSTNAMEXXX"

## build full repo path

REPOSITORY="${BACKUP_USER}@${BACKUP_HOST}:/var/lib/backup/${REPOSITORY_DIR}"

## Write Log

exec > >(tee -i ${LOG})
exec 2>&1

echo "###### Backup gestartet: $(date) ######"
TIMESTAMP=`date +%Y-%m-%d_%H-%M-%S`

echo "Übertrage Dateien ..."
borg create -v --stats                   \
	$REPOSITORY::${REPOSITORY_DIR}_${TIMESTAMP}  \
    /                                    \
    --exclude /dev                       \
    --exclude /proc                      \
    --exclude /sys                       \
    --exclude /var/run                   \
    --exclude /run                       \
    --exclude /lost+found                

echo "###### Backup beendet: $(date) ######"

usage in cron:

0 0 * * * /root/backup.sh > /dev/null 2>&1

termux borg backup with android

#!/bin/sh

#HOME="/storage/emulated/0/"
HOME="/"
BORG_REPO="my_mobile"

dirs="/"
dirs="/storage /data"

sudo borg create                               \
    --exclude-caches                      \
    --exclude-if-present "nobackup.tag"   \
    --exclude-if-present ".nobackup.tag"  \
    --progress                            \
    --stats                               \
    borg-backup@192.168.XX.XX:/mnt/BorgBackup/${BORG_REPO}/::'my-mobile-{now}' $dirs
    

sudo borg prune --stats --keep-within 14d --keep-daily 8 --keep-weekly 8 --keep-monthly 24 --keep-yearly -1 borg-backup@192.168.XX.XX:/mnt/BorgBackup/${BORG_REPO}/

Dyndns mit synology ipv6

Erstmal Systemsteuerung -> Aufgabenplaner
Erstellen -> Benutzerdefiniertes Skript

ipv6=$(ip -6 addr |grep global |awk '{print $2}')
ipv6=${ipv6%/64} #change /64 depending your net
curl https://USER:PASS@dyndns.kasserver.com/?myip=$ipv6

SSH mit ed25519

generate your key with:

ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519_usecase -C "name@machine"

add to ssh-agent with keychain

ssh-add -K

set permissions, if not already set:

chmod 400 ~/.ssh/*

freebsd: pkg reparieren

pkg-static install -f pkg
pkg upgrade -f

 

wenn das nicht klappt

pkg delete -f pkg && cd /usr/ports/ports-mgmt/pkg && make install clean

oder ansonsten:

cd /usr/ports/ports-mgmt/pkg && make reinstall clean