Skip to content

Instantly share code, notes, and snippets.

traceroute6 fi-tmp-as29432.anchors.atlas.ripe.net
traceroute to fi-tmp-as29432.anchors.atlas.ripe.net (2001:67c:2b0:3d::c38c:c33d) from 2001:500:15:7000::64, 30 hops max, 24 byte packets
1 router.tmp.woodynet.net (2001:500:15:7000::1) 1.934 ms 1.246 ms 1.187 ms
2 trex2.unicast.trex.fi (2001:7f8:1d:4::72f8:2) 185.241 ms 185.359 ms 185.356 ms
3 fi-tmp-as29432.anchors.atlas.ripe.net (2001:67c:2b0:3d::c38c:c33d) 180.206 ms !S 179.886 ms !S 179.604 ms !S
response
08:01:22.294814 IP6 (hlim 49, next-header ICMPv6 (58) payload length: 80) 2001:67c:2b0:3d::c38c:c33d > 2001:500:15:7000::64: [icmp6 sum ok] ICMP6, destination unreachable, unreachable prohibited 2001:67c:2b0:3d::c38c:c33d
0x0000: 6000 0000 0050 3a31 2001 067c 02b0 003d `....P:1...|...=
0x0010: 0000 0000 c38c c33d 2001 0500 0015 7000 .......=......p.
@b4ldr
b4ldr / dns.sh
Last active August 29, 2015 14:05
ZONE_PATH="/home/bind"
BIND_PATH="/var/lib/bind"
TMP=$(mktemp)
FC="dns.zones.txt"
for ZONE in $(awk '$2=="Primary" {print $1}' "${ZONE_PATH}/${FC}")
do
echo -e "zone ${ZONE} {\n\ttype slave;\n\tmasters { 192.168.1.100; };\n\tfile \"${BIND_PATH}/${ZONE}.zone\";\n};"
done > ${TMP}
Process Process-2:
Traceback (most recent call last):
Traceback (most recent call last):
Traceback (most recent call last):
Traceback (most recent call last):
File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
Traceback (most recent call last):
Traceback (most recent call last):
File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
dig PTR 1.0-255.207.43.72.in-addr.arpa. @72.237.212.20
;; Question section mismatch: got 73.0.207.43.in-addr.arpa/PTR/IN
;; Question section mismatch: got 73.0.207.43.in-addr.arpa/PTR/IN
;; Question section mismatch: got 73.0.207.43.in-addr.arpa/PTR/IN
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Duplicate declaration: User[peadmin] is already declared in file /etc/puppetlabs/puppet/environment/nsd_concat/modules/users/manifests/adduser.pp:46; cannot redeclare at /opt/puppet/share/puppet/modules/pe_accounts/manifests/user.pp:90 on node master1.lax.dns.icann.org
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
I have an NSD module which is used to configure master and slave servers.
Currently the slave servers use a custom type to export there tsig keys
and the master server consumes these in its config. this works because
i can include the tsig config with an include statement (see code).
however i also need to add notify statements for each server.
the zone config looks a bit like this
server:
stuff
....
b.root-servers.net:7 messages, 381787 size of messages wire , 588354 size of messages text, 5928 answers, 8154 records, wire size of records 437327, text size of records 800877
k.root-servers.net:21 messages, 343417 size of messages wire , 590167 size of messages text, 5654 answers, 8154 records, wire size of records 437327, text size of records 791013
c.root-servers.net:7 messages, 381787 size of messages wire , 588354 size of messages text, 5928 answers, 8154 records, wire size of records 437327, text size of records 800877
f.root-servers.net:7 messages, 381899 size of messages wire , 588354 size of messages text, 5932 answers, 8154 records, wire size of records 437327, text size of records 801021
g.root-servers.net:7 messages, 381787 size of messages wire , 588347 size of messages text, 5928 answers, 8154 records, wire size of records 437327, text size of records 800877
import dns.query
import dns.zone
import dns.tsigkeyring
import dns.tsig
import socket
import sys
import StringIO
def get_stats(xfr):
zone = StringIO.StringIO()
time ansible -T20 -vvv 'lax03*' -m test.py
<lax03.example.com> ESTABLISH CONNECTION FOR USER: b4ldr
<lax03.example.com> EXEC ['ssh', '-tt', '-q', '-o', 'ControlMaster=auto', '-o', 'ControlPersist=60s', '-o', 'ControlPath=/home/b4ldr/.ansible/cp/ansible-ssh-%h-%p-%r', '-o', 'Port=22', '-o', 'KbdInteractiveAuthentication=no', '-o', 'PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey', '-o', 'PasswordAuthentication=no', '-o', 'ConnectTimeout=20', u'lax03.example.com', "/bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-1404477098.53-159657835706860 && chmod a+rx $HOME/.ansible/tmp/ansible-1404477098.53-159657835706860 && echo $HOME/.ansible/tmp/ansible-1404477098.53-159657835706860'"]
<lax03.example.com> REMOTE_MODULE test.py
<lax03.example.com> PUT /tmp/tmp4wosoI TO /home/b4ldr/.ansible/tmp/ansible-1404477098.53-159657835706860/test.py
<lax03.example.com> PUT /tmp/tmpNjAri1 TO /home/b4ldr/.ansible/tmp/ansible-1404477098.53-159657835706860/arguments
<lax03.example.com> EXEC ['ssh', '-tt', '-q
dasdfsdf