Skip to content

Instantly share code, notes, and snippets.

View vladak's full-sized avatar

Vladimir Kotal vladak

  • Europe
View GitHub Profile
@vladak
vladak / lucene-luke.md
Last active March 28, 2023 14:25
How to run Luke

Lucene has Luke built in however I cannot start it directly via lucene/luke/bin/luke.sh on Ubuntu 20.04 with OpenJDK 11.

git clone https://github.com/apache/lucene.git Lucene
cd Lucene
./gradlew assemble
java -cp './lucene/luke/build/lucene-luke-9.0.0-SNAPSHOT/*' \
    -Xmx1024m -Xms512m -XX:MaxMetaspaceSize=256m org.apache.lucene.luke.app.desktop.LukeMain
@vladak
vladak / freebsd-ktls.md
Last active April 5, 2022 14:13
FreeBSD in kernel TLS implementation notes

This is a collection of random notes about FreeBSD's in kernel TLS implementation based on reading the source code (so far). The focus is TLS for NFS/RPC.

FreeBSD in kernel TLS

  • supports TLSv1.0 to TLSv1.3
  • development time frames:
    • first FreeBSD commit (b2e60773) 27-Aug-2019, this might be just the "upstreaming" work
    • development on going (March 2021)
  • TCP only
  • no rekeying so far (as of April 2021)
@vladak
vladak / freebsd-vbox.md
Last active January 3, 2022 17:26
FreeBSD on VirtualBox
# pre-flight check
VBoxManage list ostypes | grep FreeBSD

# new VM
VM=FreeBSD
zfs create tank/vm/vkotal/$VM
VBoxManage createvm --basefolder /tank/vm/vkotal --name $VM --ostype FreeBSD_64 --register

# CPU
@vladak
vladak / openbsd-octeon.md
Last active September 27, 2024 20:30
OpenBSD octeon

OpenBSD octeon notes

These are my personal notes on how to run/use OpenBSD on Ubiquiti Edgerouter, specifically for Edgerouter 4. I installed OpenBSD bunch of releases back and keep upgrading. Perhaps some of the issues highlighted below would not happen on fresher install.

Console

Use the Cisco RJ45 Male to DB9 Female console cable + the Aten USB to serial converter.

from Ubuntu

@vladak
vladak / openssl-1.x-FIPS.md
Last active October 19, 2021 12:25
OpenSSL 1.x FIPS signature

OpenSSL 1.x FIPS embedded signature test

This gist contains my notes about how the FIPS selftest signature check works in OpenSSL 1.x. Assumes basic awareness of the OpenSSL FOM (FIPS Object Module). My focus for this case is Solaris on SPARC.

The goal is to examine some of the inner workings of FIPS signature verification.

The FOM is built as fipscanister.o using designated code and linked into common OpenSSL build. When the libcrypto.so library is loaded, the FOM will perform self test. If the self test fails, the running program is abort()ed.

@vladak
vladak / freebsd-ktls-build.md
Last active February 4, 2022 10:17
FreeBSD KTLS build
@vladak
vladak / 1-pf-grafana.md
Last active May 12, 2023 09:37
setup for PF monitoring in Grafana

Presenting PF counters in Grafana

using https://yetiops.net/posts/openbsd-snmp-exporter/

The goal is to present basic metrics such as bytes passed through the external interface of the router. The main idea is to run SNMP on the OpenBSD router that can get the metrics from PF. Then SNMP exporter from Prometheus will convert the data to Prometheus format that can be scraped by Grafana.

The constraint is that this should be done in reasonably secure way: the IoT devices are in separate VLAN, however the router should have miminal exposure. Using snmpd with privilege separation and in flight data protection is sufficient. Further, the data collection and graphing will be done on single machine.

The result looks like this: Grafana PF dashboard

@vladak
vladak / sun-booklet.md
Last active April 27, 2022 07:05
Sun Microsystems - What we must do

Sun Microsystems - What we must do

A 2005 booklet with mission statement from Scott McNealy.


What we must do.

Participate or perish ?

@vladak
vladak / solokey-ssh.md
Last active October 2, 2024 19:33
Solokey setup for SSH

This is meant for Ubuntu 20.04.4 LTS and Solokey Somu

The purpose of the key is backup key (in case all my Yubikeys and smart phone get lost), hence the resident SSH key and 2FA setup for the Github account.

Initial setup

python3 -m venv env
. ./env/bin/activate
@vladak
vladak / 1-grafana-truenas.md
Last active September 11, 2022 20:38
TrueNAS dashboard for Grafana

TrueNAS dashboard for Grafana

This setup is basically using the configuration from https://crashlaker.github.io/2021/10/09/truenas_snmp_exporter.html

It assumes Prometheus as data backend. Also, nas.local is the NAS machine hostname used throughout this Gist.

This note is a bit of a experiment with Gists.

The end result looks like this: grafana-NAS