Skip to content

Instantly share code, notes, and snippets.

@zajdee
zajdee / ripe-ncc-educa-QA
Created June 8, 2020 11:55
The answers to questions that popped up as part of my talk on RIPE NCC::Educa 2020
> --------------------------
> Open Questions (8)
> --------------------------
> 1. Colin: Any idea of plan or roadmap for when other browers will support HE V2?
> 2. Colin: browsers :-)
We have to request it from browser vendors and explain the benefits so that they want to implement it. As far as I know, v2 is not on any browser vendor's roadmap.
> 3. Christian Bretterhofer: can we persuade to get a browser plugin to switch from happy eyballs to ipv6 only and back?
Not sure why would anyone want to do that; additionally the browser plugins have become less powerful over time - I'm not a plugin developer, but from what I know I assume it's not possible for a plugin to override DNS or the connection attempts of the browser.
> 4. david yasler 2: who is monitoring "happy Eye Balls" and do you need the addressing space or will it self discover
> 5. david yasler 2: dial up
#!/usr/bin/env python3
from ipaddress import ip_network
with open('address.list', 'r') as f:
for line in f.readlines():
address = line.strip()
print(ip_network('{}/64'.format(address), strict=False).exploded)
print(ip_network('{}/48'.format(address), strict=False))
print(ip_network('{}/32'.format(address), strict=False))
<plist version="1.0">
<dict>
<key>ConsentText</key>
<dict>
<key>default</key>
<string>Installs APN YOURAPNNAME IPv6</string>
</dict>
<key>PayloadContent</key>
<array>
<dict>
<plist version="1.0">
<dict>
<key>ConsentText</key>
<dict>
<key>default</key>
<string>Installs APN YOURAPNNAME IPv4v6</string>
</dict>
<key>PayloadContent</key>
<array>
<dict>
@zajdee
zajdee / java_tool_options.startup.plist
Created October 22, 2019 11:48
MacOS X 10.10+ .plist to make Java work in an IPv6-only+NAT64/DNS64 environment
<?xml version="1.0" encoding="UTF-8"?>
<!-- Save the contents of this file as ~/Library/LaunchAgents/java_tool_options.startup.plist -->
<!-- Log off and on afterwards, wait until the plist is loaded. Run a program, get its pid and -->
<!-- check using `ps eww -o command <pid> | tr ' ' '\n' | grep -i java` that the system-wide environment variable is set -->
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>java_tool_options.startup</string>
<key>ProgramArguments</key>
@zajdee
zajdee / jool-init.sh
Last active October 6, 2023 11:36
Init Jool in a namespace
#!/bin/bash
# Save the file as e.g. /usr/sbin/jool-init.sh
# Edit to match your translation prefix
NAT64_PFX=64:ff9b::/96
# Edit to match your dual-stack interface
DUALSTACKIFACE=ens5
modprobe jool
# add namespace and devices to link the two namespaces
@zajdee
zajdee / dump-compal-data.py
Created June 19, 2019 18:33
Liberty Global Compal CH7465LG dumper
#!/usr/bin/env python
import xml.dom.minidom
import xml.etree.ElementTree as ET
import json
import requests
import os
import lxml.etree as etree
def prettyPrintXml(filename):
echo "options usb-storage quirks=0bc2:331a:o" | tee -a /etc/modprobe.d/blacklist_uas_seagate.conf
@zajdee
zajdee / debian-initramfs-ipv6-hook-script
Last active February 20, 2024 13:51
Scripts to support IPv6 networking in Debian pre-boot (initramfs) environment
#!/bin/sh
# Script to be placed in /etc/initramfs-tools/hooks/ipv6
PREREQ=""
prereqs()
{
echo "$PREREQ"
}
ID Country code Municipality Subsidy (EUR) Selected or reserve
17640 AT Altenberg bei Linz 15000 selected
1897 AT Assling 15000 selected
24828 AT Bad Deutsch-Altenburg 15000 selected
23275 AT Bad Radkersburg 15000 selected
2044 AT Bad Tatzmannsdorf 15000 selected
11890 AT Baumgarten 15000 reserve
20626 AT Blons 15000 selected
19780 AT Dalaas 15000 selected
7327 AT Dellach 15000 selected