Skip to content

Instantly share code, notes, and snippets.

View khorsmann's full-sized avatar

Karsten Horsmann khorsmann

  • Germany / Hanover
View GitHub Profile
@khorsmann
khorsmann / wsl2 installation dnsmasq.md
Last active March 27, 2024 08:22
wsl2 installation dnsmasq.md

Copy from https://raw.githubusercontent.com/absolunet/pleaz/production/documentation/installation/wsl2/dnsmasq.md

Installation for WSL 2 - dnsmasq

Documentation > Installation for WSL 2 > dnsmasq

dnsmasq is free software providing Domain Name System (DNS) caching, a Dynamic Host Configuration Protocol (DHCP) server, router advertisement and network boot features, intended for small computer networks.

Table of Contents

  1. Add DNS servers on the WSL network adapter
  2. Configure the dnsmasq service on WSL 2 Ubuntu
@khorsmann
khorsmann / WSLWindows10Setup.md
Last active March 27, 2024 08:07 — forked from AjkayAlan/WSLWindows10Setup.md
Windows SubSystem For Linux setup that I like with some developers stuff mixed in

Setting Up WSL

Install A Distro:

  1. Run the following in powershell as admin Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

  2. Install a distro (ex: Ubuntu 18.04 LTS - https://www.microsoft.com/store/apps/9N9TNGVNDL3Q)

  3. Open your distro you installed via the start menu, let it setup

  4. Update and upgrade

sudo apt-get update
@khorsmann
khorsmann / check_uac.py
Created December 2, 2022 09:30
kamailio uac module state checker for nagios or check_mk
#!/bin/env python3
import sys
import shlex
import json
from subprocess import Popen
from subprocess import PIPE
get_pid = shlex.split("pgrep -c [k]amailio")
uac_cmd = shlex.split("/usr/sbin/kamctl rpc uac.reg_dump")
check_name = "uac_reg_"
@khorsmann
khorsmann / mount-chroot.sh
Created October 23, 2021 00:26
short root-server mount and chroot hint
mount /dev/md2 /mnt
mount -o rbind /dev /mnt/dev
mount -t proc proc /mnt/proc
mount -t sysfs sys /mnt/sys
chroot /mnt
@khorsmann
khorsmann / ansible-summary.md
Created March 11, 2021 15:19 — forked from andreicristianpetcu/ansible-summary.md
This is an ANSIBLE Cheat Sheet from Jon Warbrick

An Ansible summary

Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)

Configuration file

intro_configuration.html

First one found from of

@khorsmann
khorsmann / notes.md
Created December 22, 2019 14:37
notes for p1 / raspberry pi k3s cluster
@khorsmann
khorsmann / kamailio-logfile.txt
Created November 7, 2019 12:47
Call PRIVATE to PUBLIC / MS-Teams with broken RE-INVITE
Nov 7 13:38:06 sbc1 /usr/sbin/kamailio[6140]: INFO: <script>: Received message
'OPTIONS sip:sbc-d01.MYDOMAIN.EXAMPLE:5061;transport=tls SIP/2.0
FROM: <sip:sip-du-a-eu.pstnhub.microsoft.com:5061>;tag=8eb9b958-72f0-4827-a3be-ec9f825f7649
TO: <sip:sbc-d01.MYDOMAIN.EXAMPLE>
CSEQ: 1 OPTIONS
CALL-ID: 9cca2786-b6df-4b3e-882b-db1dfe2de040
MAX-FORWARDS: 70
VIA: SIP/2.0/TLS 52.114.75.24:5061;branch=z9hG4bKa01fb94a
CONTACT: <sip:sip-du-a-eu.pstnhub.microsoft.com:5061>
CONTENT-LENGTH: 0
@khorsmann
khorsmann / kamailio.cfg
Created November 7, 2019 09:58
kamailio.cfg 5.3 with REINVITE issues (not correct SRTP handling)
#!KAMAILIO
####### Include Local Config If Exists #########
import_file "kamailio-local.cfg"
# Content of kamailio-local.cfg
listen=udp:172.20.xx.xxx:5060 # CORRECT THIS
listen=tls:212.xx.xx.xxx:5061 # CORRECT THIS
#!define DBURL "text:///etc/kamailio/database"
#!define WITH_NAT
@khorsmann
khorsmann / LOGFILE.txt
Created October 22, 2019 14:34
debug=3 kamailio -DD -E -f /etc/kamailio/kamailio.cfg 2>&1 | tee -a LOGFILE
kamailio -DD -E -f /etc/kamailio/kamailio.cfg 2>&1 | tee -a LOGFILE
cat LOGFILE | grep -v 'core/re.c:' > LOGFILE.txt
0(28227) INFO: <core> [core/ppcfg.c:83]: pp_subst_add(): ### added subst expression: !MY_HTTP_ADDR!tcp:127.0.0.1:8080!g
0(28227) INFO: tls [tls_init.c:503]: init_tls_compression(): disabling compression...
0(28227) INFO: <core> [core/sctp_core.c:75]: sctp_core_check_support(): SCTP API not enabled - if you want to use it, load sctp module
0(28227) WARNING: <core> [core/socket_info.c:1394]: fix_hostname(): could not rev. resolve 212.XX.XX.XX
0(28227) WARNING: <core> [core/socket_info.c:1394]: fix_hostname(): could not rev. resolve 172.20.120.83
0(28227) WARNING: <core> [core/socket_info.c:1394]: fix_hostname(): could not rev. resolve 172.20.120.83
0(28227) WARNING: <core> [core/socket_info.c:1394]: fix_hostname(): could not rev. resolve 212.XX.XX.XX
@khorsmann
khorsmann / VAGRANT-Cheat-Sheet.md
Created June 2, 2019 12:53 — forked from carlessanagustin/VAGRANT-Cheat-Sheet.md
This is a VAGRANT cheat sheet

Vagrant Cheat Sheet

add image

local

$ vagrant box add {title} {url}
$ vagrant init {title}
$ vagrant up