Skip to content

Instantly share code, notes, and snippets.

View smammy's full-sized avatar

Sam Birch smammy

View GitHub Profile
@smammy
smammy / git-confhelp
Last active June 13, 2024 15:47
git confhelp: local help for configuration variables, straight from the source
#!/usr/bin/env perl
# © 2023 Sam Birch <[email protected]> - Licensed under the EUPL.
use v5.28; # A Big Sir
use warnings;
use autodie;
use Cwd 'cwd';
use IPC::Cmd 'can_run';
use File::Temp 'tempdir';
@smammy
smammy / macOS-IPv6-Tunnel-DNS-HOWTO.md
Created December 13, 2018 19:14
How to convince macOS to do IPv6 DNS lookups when your only IPv6 address is via a VPN or tunnel of some sort

This was a huge hassle to figure out, so I wrote up a little guide in hopes that others would find it helpful:

How to convince macOS to do IPv6 DNS lookups when your only IPv6 address is via a VPN or tunnel of some sort

The Problem

macOS's domain name resolver will only return IPv6 addresses (from AAAA records) when it thinks that you have a valid routable IPv6 address. For physical interfaces like Ethernet or Wi-Fi it's enough to set or be assigned an IPv6 address, but for tunnels (such as those using utun interfaces) there are some extra annoying steps that need to be taken to convince the system that yes, you indeed have an IPv6 address, and yes, you'd like to get IPv6 addresses back for DNS lookups.

I use wg-quick to establish a WireGuard tunnel between my laptop and a Linode virtual server. WireGuard uses a utun user-space tunnel device to make the connection. Here's how that device gets configured:

Keybase proof

I hereby claim:

  • I am smammy on github.
  • I am smammy (https://keybase.io/smammy) on keybase.
  • I have a public key whose fingerprint is 5305 2CCE 5298 F756 B36F 294B 4091 FB04 CC3F 9B33

To claim this, I am signing this object: