Skip to content

Instantly share code, notes, and snippets.

View lestercheung's full-sized avatar

Lester Cheung lestercheung

View GitHub Profile

How to disable AAAA lookups?

Problem description

The corporate DNS server that is outside of our control doesn't handle AAAA queries properly. When sent a AAAA query, the DNS server doesn't respond. A properly working DNS server returns NOERROR, ANSWER: 0, if there is no AAAA record for a given name. Misconfigured DNS server doesn't send any response.

In an IPv6-enabled environment, the client tries to resolve both A and AAAA addresses. If the DNS server doesn't send any reply, the client repeats the query and eventually times out. Only after the AAAA query times out, the client will use the A address. Waiting for the timeouts renders utilities like curl, kubectl, oc, ... and others unusable.

Identifying the AAAA lookup problem

@smoser
smoser / README.md
Last active May 2, 2024 09:23
qemu to linux mapping of smbios / dmi information

Mappings for DMI/SMBIOS to Linux and dmidecode

Information can be put into dmi tables via some qemu-system hosts (x86_64 and aarch64). That information is exposed in Linux under /sys/class/dmi/id and can be read with dmidecode. The names are very annoyingly inconsistent. The point of this doc is to map them.

Mappings

Example qemu cmdline:

qemu-system-x86_64 -smbios type=<type>,field=value[,...]

qemu-system-x86_64 -smbios type=0,vendor=superco,version=1.2.3
@alex-red
alex-red / blacklist.sh
Last active December 22, 2023 04:30
Geo-IP Block for Edgerouter
#Backup previous list
rm -f BLACKLIST_OLD.txt
mv BLACKLIST.txt BLACKLIST_OLD.txt
touch BLACKLIST.txt
#Download the file from PGL.YOYO
curl -O http://pgl.yoyo.org/as/iplist.php
#Download the file from emerging threats
curl -O http://rules.emergingthreats.net/fwrules/emerging-Block-IPs.txt
#Download the first file from SpamHaus
curl -O http://www.spamhaus.org/drop/drop.txt
@jeanlouisferey
jeanlouisferey / LXD_SSH_KEY.md
Last active May 5, 2024 13:32
How to create a LXD Container with your ssh key in it (and with ssh server in the container)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
anonymous
anonymous / gist:4a752288b785312ca840
Created December 31, 2015 16:35
import string
import random
def pw_gen(size = 8, chars=string.ascii_letters + string.digits + string.punctuation):
return ''.join(random.choice(chars) for _ in range(size))
print(pw_gen(int(input('How many characters in your password?'))))
anonymous
anonymous / lsusb
Created November 15, 2015 10:12
ASUS ZenBook UX305CA
Bus 002 Device 002: ID 0bda:8153 Realtek Semiconductor Corp.
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 8087:0a2a Intel Corp.
Bus 001 Device 003: ID 064e:9700 Suyin Corp. Asus Integrated Webcam
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
anonymous
anonymous / 900D30E8-2DD9-4EE9-81EC-F8163935CD4A-d7843028a9bc685a74cac82a1c75206a.lrprev
Created March 26, 2013 09:54
metadata embedded inside adobe lightroom preview files.
pyramid = {
colorProfile = "AdobeRGB",
croppedHeight = 213,
croppedWidth = 320,
digest = "d7843028a9bc685a74cac82a1c75206a",
fileTimeStamp = 319349647,
fingerprint = "C108BA19E3369F5631F97CAC61E54BBB",
formatVersion = 3,
levels = {
{
@leifg
leifg / Vagrantfile
Last active November 12, 2023 08:31
Add a second disk to system using vagrant
file_to_disk = './tmp/large_disk.vdi'
Vagrant::Config.run do |config|
config.vm.box = 'base'
config.vm.customize ['createhd', '--filename', file_to_disk, '--size', 500 * 1024]
config.vm.customize ['storageattach', :id, '--storagectl', 'SATA Controller', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', file_to_disk]
end