Skip to content

Instantly share code, notes, and snippets.

@squarooticus
squarooticus / prefertmpaddr.c
Created August 4, 2022 21:24
Use with LD_PRELOAD to prefer temporary addresses in specific processes
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <linux/in6.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <errno.h>
#include <dlfcn.h>
@squarooticus
squarooticus / nftables_mdns.conf
Last active January 31, 2024 06:44
Use nftables to repeat mDNS/Bonjour packets across two different interfaces. Works for Google Cast/Chromecast groups!
table ip mangle {
chain prerouting {
type filter hook prerouting priority mangle; policy accept;
ip daddr 224.0.0.251 iif eth3 ip saddr set 192.168.2.1 dup to 224.0.0.251 device eth2 notrack
ip daddr 224.0.0.251 iif eth2 ip saddr set 192.168.3.1 dup to 224.0.0.251 device eth3 notrack
}
}
table ip6 mangle {
chain prerouting {
@squarooticus
squarooticus / keybase.md
Created March 19, 2014 17:23
keybase github proof of identity

Keybase proof

I hereby claim:

  • I am squarooticus on github.
  • I am krose (https://keybase.io/krose) on keybase.
  • I have a public key whose fingerprint is 5399 C516 1CA9 B580 44FF 97ED E5A7 3A55 3339 05F5

To claim this, I am signing this object: