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 / gist:271ce911c6a4fc92d03c206d3b9dc35f
Last active April 26, 2018 09:33 — forked from sdoro/gist:4291961
restart OpenVPN server in CLI pfsense
# (edits /conf/config.xml symlink to /cf/conf/config.xml)
viconfig
# add for example fragment 1300;mssfix to a client
# <openvpn>
# <openvpn-client>
# <topology>subnet</topology>
# <custom_options>fragment 1300;mssfix 1300</custom_options>
# restart all OpenVPN service
@khorsmann
khorsmann / nginx.conf
Created June 23, 2018 19:07 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
- Install Python, git, build-essential from dietpi-software
- Run rpi-source: https://github.com/notro/rpi-source/wiki
- Enable IP Forwarding
- nano /etc/sysctl.conf:
- net.ipv4.ip_forward = 1
- sudo apt-get install libmnl-dev
- git clone https://git.zx2c4.com/WireGuard
@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
@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 / 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 / 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 / notes.md
Created December 22, 2019 14:37
notes for p1 / raspberry pi k3s cluster
@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 / 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