ScionLab

Install Doku Upgrade Fresh Debian apt-get -y update apt-get -y upgrade apt-get -y distupgrade apt-get -y install vim Scion apt-get install apt-transport-https echo "deb [trusted=yes] https://packages.netsec.inf.ethz.ch/debian all main" | tee /etc/apt/sources.list.d/scionlab.list apt-get update apt-get install scionlab Config scionlab-config --host-id=1fcf8axxxxxxxxxxxxxxxxxxxxxxxxxx --host-secret=4ef93cxxxxxxxxxxxxxxxxxxxxxxxxxx Check Services root@scionlab:~# ip address show dev tun0 4: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 100 link/none inet 10.1.1.52/16 brd 10.1.255.255 scope global tun0 valid_lft forever preferred_lft forever inet6 fe80::aa8a:c135:f627:bcff/64 scope link stable-privacy valid_lft forever preferred_lft forever root@scionlab:~# grep Interfaces -A15 /etc/scion/gen/ISD*/AS*/endhost/topology.

Gitolite

You wanna host your own Git Repositories ? Have a look at Gitolite. It does all for you :) Install GitoLite pkg_add gitolite Add git user root@gitserver ~# adduser -silent Enter username []: git Enter full name []: git repo user Enter shell bash csh git-shell ksh nologin sh [ksh]: Uid [1001]: Login group git [git]: Login group is ``git''. Invite git into other groups: guest no [no]: Login class authpf bgpd daemon default pbuild staff unbound [default]: Enter password []: Disable password logins for the user?

Git

Some Git Commands Merge two Repos “merge unrelated histories” git pull origin master --allow-unrelated-histories git push git pull ### Find deleted File git log --diff-filter=D --summary commit abcecadce91af3814662fa6a04d0f12e361f0574 Date: Sun May 31 23:19:59 2020 +0200 update delete mode 100644 master/sed.tcpdump commit 81ae58d70c27d02eb2f65beed4fe0b571073f087 Date: Fri May 29 16:06:14 2020 +0200 update Restore deleted File git checkout 81ae58d70c27d02eb2f65beed4fe0b571073f087 sed.tcpdump

OpenBSD 6.7

OpenBSD 6.7 appeared today OpenBSD has two new releases every year. historically, on 1. Mai and 1. November. With a few small execptions in the past Check Wikipedia so, then latest OS appeared today: OpenBSD 6.7 Perform a Full Upgrade (incl. X Stuff) sysupgrade -r Run the Script (on your own risk !) doas su - mkdir /root/bin ftp -o /root/bin/upgrade_to_67.sh https://puffy.nolink.ch/scripts/upgrade_to_67.sh chmod 740 /root/bin/upgrade_to_67.sh # /root/bin/upgrade_to_67.sh or use some custom Script (just Xbase and not other X Stuff) doas su - mkdir /root/bin cat <<'EOF' > /root/bin/upgrade_to_67.

OpenBSD Add Storage

you’ve got a maschine and you’re running out of disk space. attach a new disk like this: # fdisk -i sd1 Note: Substitue sd1 for your disk. ... # disklabel -E sd1 > p m > a a > quit # newfs sd1a # mkdir /data # mount /dev/sd1a /data/ and make permament in /etc/fstab

Sqlite

Do you like SQLite ? just started using it a bit more often … https://www.sqlitetutorial.net/ Query sqlite3 /path/to/db “select date,time,ip from table where ip='1.2.3.4’ limit 100; .schema show the database schema and indexes sqlite> .schema CREATE TABLE attack( "date" TEXT, "time" TEXT, "ip" TEXT, "asnr" TEXT, "ascountry" TEXT, "asdesc" TEXT, "port" TEXT, "proto" TEXT, "server" TEXT, "type" TEXT, "method" TEXT, "pass" TEXT, "user" TEXT, "ver" TEXT ); CREATE UNIQUE INDEX id on attack(date,time,ip,user,pass); Insert INSERT INTO table (column1,column2 ,.

Ubuntu Kickstart

How to Kickstart a Ubuntu Installation … edit dhcpd.conf host ubuntu { hardware ethernet 4E:E5:80:xx:xx:xx; fixed-address x.x.x.x; filename "ubuntu/pxelinux.0"; next-server x.x.x.200; } restart dhcpd prepare env on tftp server (x.x.x.200) mkdir -p /tftpboot/ubuntu/ cd /tftpboot/ubuntu/ ftp http://archive.ubuntu.com/ubuntu/dists/bionic-updates/main/installer-amd64/current/images/netboot/netboot.tar.gz tar xfz netboot.tar.gz kickstart cfg put the following file in a webroot available from the client machine cat <<'EOF' > /var/www/htdocs/ks.cfg #Generated by Kickstart Configurator #platform=AMD64 or Intel EM64T #System language lang en_US #Language modules to install langsupport en_US #System keyboard keyboard ch #System mouse mouse #System timezone timezone Europe/Zurich #Root password (here 123456) rootpw --iscrypted $1$r6te7M.

Cron & Environment

Sometimes you run into problem because you’re not aware of the environment of cron. So, let’s dump and check the environment. Add Cronjob * * * * * env > /tmp/env.log Dump Content puffy200# cat /tmp/env.log LOGNAME=root HOME=/var/log PWD=/var/log PATH=/bin:/sbin:/usr/bin:/usr/sbin SHELL=/bin/sh USER=root

Python Pip

Python PIP Install pip3 pkg_add py3-pip-19.1.1 ln -sf /usr/local/bin/pip3.7 /usr/local/bin/pip Search pip search csvkit Install csvkit pip install csvkit Upgrade pip doas pip3 install --upgrade pip