Skip to content

Instantly share code, notes, and snippets.

View ipcjk's full-sized avatar
😍
so much younger than today

Jörg Kost ipcjk

😍
so much younger than today
  • Munich, Germany
View GitHub Profile
@ipcjk
ipcjk / howto_utm_vpn_macos.md
Created July 28, 2026 17:07 — forked from lukirs95/howto_utm_vpn_macos.md
How to access Host VPN Network from UTM Guest on MacOS

Problem

Your host machine (MacOS) get's an ip address from your VPN provider and possibly some routes to the remote network, but your VPN provider has no clue about other networks inside your host machine. That's what blocks UTM (QEMU) virtual machines from accessing the vpn network. UTM generates a new network for vm's and route entries for it automatically. This network is not known at the other side of the VPN, so although your PINGs reach the VPN the receiver of that ping does not know where to send it back.

Solution

@ipcjk
ipcjk / chromecast_mac.sh
Created May 7, 2026 06:51
Play from VLC to Chromecast on MAC
#!/bin/bash
cd /Applications/VLC.app/Contents/MacOS/
./VLC --sout "#chromecast" --sout-chromecast-ip="192.168.0.6" "http://foobar....playlist.m3u8"
@ipcjk
ipcjk / openvpn_openssl_from_source.yaml
Last active May 23, 2024 19:48
Install openssl and openvpn + easyrsa3 from source with ansible
---
- name: Download + compile recent versions of OpenSSL,OpenVPN and easyrsa3 from source
hosts: all
gather_facts: true
vars:
user_configuration:
servername: vpn.localhost.com
easyrsa_path: "/usr/local/easyrsa3"
openssl_version: "3.3.0"
@ipcjk
ipcjk / bgpd.c.patch
Created May 16, 2020 16:15
quagga bgpd uptime patch
diff -upwbr quagga/bgpd/bgpd.c quagga-jk/bgpd/bgpd.c
--- quagga/bgpd/bgpd.c 2012-06-27 12:02:11.000000000 +0200
+++ quagga-jk/bgpd/bgpd.c 2012-06-27 12:06:46.000000000 +0200
@@ -4646,6 +4646,7 @@ peer_uptime (time_t uptime2, char *buf,
/* Making formatted timer strings. */
#define ONE_DAY_SECOND 60*60*24
#define ONE_WEEK_SECOND 60*60*24*7
+#define ONE_YEAR_SECOND 60*60*24*7*52
if (uptime1 < ONE_DAY_SECOND)
@ipcjk
ipcjk / ipsec-tools-0.8-alpha20090422
Created May 16, 2020 16:10
ipsec-tools racoon patch against ldap / active directory null authentication from 2009
diff -crB ipsec-tools-0.8-alpha20090422/src/racoon/isakmp_xauth.c joerg/ipsec-tools-0.8-alpha20090422/src/racoon/isakmp_xauth.c
*** ipsec-tools-0.8-alpha20090422/src/racoon/isakmp_xauth.c 2009-06-02 08:08:09.000000000 +0200
--- joerg/ipsec-tools-0.8-alpha20090422/src/racoon/isakmp_xauth.c 2009-06-02 08:08:18.000000000 +0200
***************
*** 893,898 ****
--- 893,905 ----
atlist[1] = NULL;
atlist[2] = NULL;
+ /* deny empty login */
use std::net::UdpSocket;
use std::fs::File;
use std::io::prelude::*;
fn main() {
let host = "127.0.0.1";
let port = "53";
let x = File::open("/etc/passwd");
let mut file = match x {
use std::net::TcpStream;
fn main() {
for port in 0 .. 30 {
if let Ok(_) = TcpStream::connect(format!("{}:{}", "anyhost", port)) {
println!("{} open", port);
}
}
}
@ipcjk
ipcjk / checksupervisor.pl
Created October 29, 2019 08:27
Check supervisor processes for checkMK
#! /usr/bin/perl
foreach (split /[\r\n]+/, `supervisorctl status`) {
/([\w\-\d_]+)\s+([A-Z]+)\s+(.*)$/;
if($2 eq 'RUNNING') { print "0";} else { print "1";}
print " $1 - $3\n";
}
@ipcjk
ipcjk / sched.go
Created August 19, 2019 09:05
golang syscall set real time priority for task
package main
import (
"fmt"
"syscall"
"unsafe"
)
const (
SCHED_NORMAL = iota
@ipcjk
ipcjk / cleanKernel.pl
Last active October 10, 2019 09:40
All mighty kernel cleanup script for Debian based distributions
#!/usr/bin/perl -w
use strict;
# Some vars..
my @KPKGS;
my $myKernel = `uname -r`;
chomp $myKernel;