<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>spoofedpacket &#187; Networking</title>
	<atom:link href="http://www.spoofedpacket.net/index.php/category/networking/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.spoofedpacket.net</link>
	<description>Rob Gallagher</description>
	<lastBuildDate>Thu, 27 May 2010 16:35:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>First steps towards DNSSEC</title>
		<link>http://www.spoofedpacket.net/index.php/2009/04/03/first-steps-towards-dnssec/</link>
		<comments>http://www.spoofedpacket.net/index.php/2009/04/03/first-steps-towards-dnssec/#comments</comments>
		<pubDate>Fri, 03 Apr 2009 12:53:47 +0000</pubDate>
		<dc:creator>rob</dc:creator>
				<category><![CDATA[DNS]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.spoofedpacket.net/?p=79</guid>
		<description><![CDATA[I recently began deploying DNSSEC within HEAnet. Things are at an early stage, but I&#8217;m hoping to have some signed zones up and running in the next few months. For testing, I wanted to find a practical application of DNSSEC, rather than simply stating &#8220;now our zones are secure against attack A, B and C&#8221;. [...]]]></description>
			<content:encoded><![CDATA[<p>I recently began deploying <a href="http://www.dnssec.net/">DNSSEC</a> within HEAnet. Things are at an early stage, but I&#8217;m hoping to have some signed zones up and running in the next few months.</p>
<p>For testing, I wanted to find a practical application of DNSSEC, rather than simply stating &#8220;now our zones are secure against attack A, B and C&#8221;.</p>
<p><a href="http://tools.ietf.org/html/rfc4255">RFC4255</a> provides exactly this, with automatic verification and trusting of SSH host keys through a combination of the SSHFP record type and DNSSEC validation. This removes the need to maintain a known_hosts file on each client, key fingerprints can simply be distributed through DNS. </p>
<p>I started by generating our zone signing key (ZSK) and key signing key (KSK) for the secure zone, <strong>login.heanet.ie</strong>. These are 1024bit RSASHA1 keypairs. </p>
<pre>
 mkdir /etc/bind/keys
 cd !$
 dnssec-keygen -r /dev/random -a RSASHA1 \
  -b 1024 -n ZONE login.heanet.ie
 dnssec-keygen -r /dev/random -f KSK \
  -a RSASHA1 -b 1024 -n ZONE login.heanet.ie
</pre>
<p>Then, I imported the trust anchor (KSK public part) for the zone into the DNS resolver. We are using <a href="http://www.unbound.net">Unbound</a> but BIND etc. configuration is somewhat similar. </p>
<pre>
cp Klogin.heanet.ie.+005+61342.key /etc/unbound/anchors/login.heanet.ie.anchor
...
vi /etc/unbound/unbound.conf
...
#
# login.heanet.ie test signed zone - robertg@heanet.ie 20090309
#
trust-anchor-file: "/etc/unbound/anchors/login.heanet.ie.anchor"
...
</pre>
<p>To prepare the zone for signing, I published the ZSK and KSK public keys at the apex of the zone, ie: after NS records but before any other records are defined.</p>
<pre>
@                       IN      NS      ns.heanet.ie.

; DNSSEC public keys
$INCLUDE                /etc/bind/keys/Klogin.heanet.ie.+005+01530.key  ;ZSK
$INCLUDE                /etc/bind/keys/Klogin.heanet.ie.+005+61342.key  ;KSK

; hosts
charlene                IN      A       193.1.219.75
charlene                IN      AAAA    2001:770:18:2::193.1.219.75
charlene                IN      SSHFP   1 1 d343493a92fdd26281dddc26e90440e5504c3b1a
charlene                IN      SSHFP   2 1 4fad90afa04a6b62371091662f88685822b07ebb
</pre>
<p>Now, to actually sign the zone! I signed the RRsets in the zone with <strong>dnssec-signzone</strong> and the ZSK and KSK keypairs we generated earlier. This produces a signed version of the zonefile, of the form zonefile.signed. The KSK (61342) is used to sign the keys we entered at the apex of the zone earlier, and the ZSK (01530) is used to sign all the other records in the zone. </p>
<pre>
dnssec-signzone -r /dev/random -o login.heanet.ie \
-k /etc/bind/keys/Klogin.heanet.ie.+005+61342.key \
login.heanet.ie /etc/bind/keys/Klogin.heanet.ie.+005+01530.key
</pre>
<p>Then, I loaded the .signed file into the authoritative nameserver.</p>
<pre>
zone "login.heanet.ie" {
        type master;
        file "pz/forward/login.heanet.ie.signed";
};
</pre>
<p>After doing this, it&#8217;s a good idea to check for any errors in name server log.</p>
<p>As a first test, I made a DNSSEC query to the resolvers. It should follow the chain of trust and securely resolve the query. The &#8220;ad&#8221; &#8211; authenticated data &#8211; flag in the flags: section of the dig output confirms that the zone data is signed and has been verified as authentic. The <strong>+dnssec</strong> option sets the DO (DNSSEC OK) bit on the query and the <strong>+multiline</strong> option is simply used for readability purposes.</p>
<pre>
dig @resolver0.heanet.ie charlene.login.heanet.ie +dnssec +multiline

; <<>> DiG 9.5.0-P2 <<>> @resolver0.heanet.ie charlene.login.heanet.ie +dnssec +multiline
; (2 servers found)
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 42200
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 2, AUTHORITY: 2, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags: do; udp: 4096
;; QUESTION SECTION:
;charlene.login.heanet.ie. IN A

;; ANSWER SECTION:
charlene.login.heanet.ie. 3600 IN A 193.1.219.75
charlene.login.heanet.ie. 3600 IN RRSIG	A 5 4 3600 20090429144034 (
				20090330144034 1530 login.heanet.ie.
				dw8qCGcHEBA8kSfv3CTr7sTM7FEJvoGyY8tz9bEgIsNK
				adSgG3eUfHIQ5nMFVYvg7/MEXLfhUyXmByNjPuuMhfi0
				mvX4GV0z+MqIRfVBb6bH8kPBlAjdXisny4e8rhrheRwu
				P8FyONy88cyy5OqTattjzz8bBtMevZo4wN/KfQs= )

;; AUTHORITY SECTION:
login.heanet.ie.	3600 IN	NS ns.heanet.ie.
login.heanet.ie.	3600 IN	RRSIG NS 5 3 3600 20090429144034 (
				20090330144034 1530 login.heanet.ie.
				C7C54YAIMVqp9UJfrrM56dRd2U8OB+zkxHV2G2YN0QsR
				7XFZHVcBEjw/9l8r1E6yiRIyAx2P3XGWT/tAvYvssAG8
				p143UAn29Gqnibf5mGzhRQFGN/huCdmFSIL7yK2jinhA
				rw/ZgOrVkBnWiGYNRe4BWtIhkHbcVYZ6roWXlo8= )

;; Query time: 2 msec
;; SERVER: 2001:770:f8::c101:ba02#53(2001:770:f8::c101:ba02)
;; WHEN: Wed Apr  1 17:07:12 2009
;; MSG SIZE  rcvd: 436
</pre>
<p>Now to test the signed SSHFP records. On the client, I added the following to resolv.conf.</p>
<pre>
options edns0
</pre>
<p>Also, I edited ~/.ssh/config and added this line in the Host section </p>
<pre>
VerifyHostKeyDNS yes
</pre>
<p>When ssh'ing to a the machine with signed SSHFP records, the user should not be prompted to accept the host key, even if it is "unknown".</p>
<pre>
ssh -v heanet@charlene.login.heanet.ie
OpenSSH_5.1, OpenSSL 0.9.7j 04 May 2006
...
debug1: found 2 secure fingerprints in DNS
debug1: matching host key fingerprint found in DNS
debug1: ssh_rsa_verify: signature correct
...
</pre>
<p>Presto! No known_hosts file. Profit! etc.. No need to maintain host keys across multiple clients, simply distribute your SSH fingerprints through DNS.</p>
<pre>
$ ls -al /home/rob/.ssh/
total 16
drwx------  2 rob  users  512 Mar 31 14:35 .
drwxr-xr-x  3 rob  users  512 Mar 31 14:15 ..
-rw-------  1 rob  users  613 Mar 31 17:23 authorized_keys
-rw-r--r--  1 rob  users  120 Mar 31 14:35 config
</pre>
<p>Of course there are a number of issues. I haven't gone through the required key rollover and resigning processes, however these are reasonably straightforward and can be automated with freely available tools.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.spoofedpacket.net/index.php/2009/04/03/first-steps-towards-dnssec/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Refreshing ftp.heanet.ie</title>
		<link>http://www.spoofedpacket.net/index.php/2008/12/16/refreshing-ftpheanetie/</link>
		<comments>http://www.spoofedpacket.net/index.php/2008/12/16/refreshing-ftpheanetie/#comments</comments>
		<pubDate>Tue, 16 Dec 2008 19:00:06 +0000</pubDate>
		<dc:creator>rob</dc:creator>
				<category><![CDATA[Networking]]></category>

		<guid isPermaLink="false">http://www.spoofedpacket.net/?p=37</guid>
		<description><![CDATA[Here&#8217;s a presentation I gave at the ILUG AGM on the new architecture powering ftp.heanet.ie; our well-known mirror server and consumer of copious amounts of bandwidth.]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a <a href="http://www.spoofedpacket.net/files/docs/ftpdot-ilug-20081213.pdf">presentation</a> I gave at the <a href="http://www.linux.ie">ILUG</a> AGM on the new architecture powering <a href="http://ftp.heanet.ie">ftp.heanet.ie</a>; our well-known mirror server and consumer of copious amounts of bandwidth.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.spoofedpacket.net/index.php/2008/12/16/refreshing-ftpheanetie/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Wireless Death Star</title>
		<link>http://www.spoofedpacket.net/index.php/2007/05/29/wireless-death-star/</link>
		<comments>http://www.spoofedpacket.net/index.php/2007/05/29/wireless-death-star/#comments</comments>
		<pubDate>Tue, 29 May 2007 19:00:59 +0000</pubDate>
		<dc:creator>rob</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[WiFi]]></category>

		<guid isPermaLink="false">http://www.spoofedpacket.net/index.php/2007/05/29/wireless-death-star/</guid>
		<description><![CDATA[OK this thing is a bit mad. If it&#8217;s real that is.. Mmm&#8230;spiky. It&#8217;s called the Slurpr and it&#8217;s capable of combining up to six wireless networks into a single channel, effectively giving you one phat connection that hoses any open wireless in the vicinity. Of course these have to be unsecured networks &#8211; but [...]]]></description>
			<content:encoded><![CDATA[<p>OK this thing is a bit mad. If it&#8217;s real that is..</p>
<p><img src="http://geektechnique.org/images/1448t.jpg" alt="Slurpr!" /></p>
<p>Mmm&#8230;spiky.</p>
<p>It&#8217;s called <a href="http://geektechnique.org/projectlab/781/slurpr-the-mother-of-all-wardrive-boxes">the Slurpr</a> and it&#8217;s capable of combining up to six wireless networks into a single channel, effectively giving you one phat connection that hoses any open wireless in the vicinity. Of course these have to be unsecured networks &#8211; but the Slupr&#8217;s 266mhz processor and onboard memory opens up the possibility of cracking encryption such as WEP on the fly. Badass.</p>
<p><a href="http://www.wellingtongrey.net/miscellanea/archive/2007-05-27--the-truth-about-wireless-devices.html">The BBC would love this.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.spoofedpacket.net/index.php/2007/05/29/wireless-death-star/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Followup to ng_fec saga</title>
		<link>http://www.spoofedpacket.net/index.php/2007/05/18/followup-to-ng_fec-saga/</link>
		<comments>http://www.spoofedpacket.net/index.php/2007/05/18/followup-to-ng_fec-saga/#comments</comments>
		<pubDate>Fri, 18 May 2007 18:02:39 +0000</pubDate>
		<dc:creator>rob</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[IPv6]]></category>
		<category><![CDATA[Networking]]></category>

		<guid isPermaLink="false">http://www.spoofedpacket.net/index.php/2007/05/18/followup-to-ng_fec-saga/</guid>
		<description><![CDATA[So everything seems to have remained stable over the past few days &#8211; and theres now a commit to the ng_fec code: Deadly!]]></description>
			<content:encoded><![CDATA[<p>So everything seems to have remained stable over the past few days &#8211; and theres now a <a href="http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/netgraph/ng_fec.c">commit</a> to the ng_fec code:</p>
<p>Deadly! <img src='http://www.spoofedpacket.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.spoofedpacket.net/index.php/2007/05/18/followup-to-ng_fec-saga/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IPv6 and ng_fec</title>
		<link>http://www.spoofedpacket.net/index.php/2007/05/15/ipv6-and-ng_fec/</link>
		<comments>http://www.spoofedpacket.net/index.php/2007/05/15/ipv6-and-ng_fec/#comments</comments>
		<pubDate>Tue, 15 May 2007 20:08:35 +0000</pubDate>
		<dc:creator>rob</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[IPv6]]></category>
		<category><![CDATA[Networking]]></category>

		<guid isPermaLink="false">http://www.spoofedpacket.net/index.php/2007/05/15/ipv6-and-ng_fec/</guid>
		<description><![CDATA[We managed to finally (hopefully) fix an annoying problem with one of our FreeBSD boxes and IPv6. For some background; we used the ng_fec (4) device on FreeBSD 6.2-RELEASE to make a logical network interface out of two physical interfaces. This is referred to as bonding on Linux, IP Multipathing on Solaris and I think [...]]]></description>
			<content:encoded><![CDATA[<p>We managed to finally (hopefully) fix an annoying problem with one of our FreeBSD boxes and IPv6. </p>
<p>For some background; we used the <a href="http://www.freebsd.org/cgi/man.cgi?query=ng_fec&#038;apropos=0&#038;sektion=0&#038;manpath=FreeBSD+6.2-RELEASE&#038;format=html">ng_fec (4)</a> device on FreeBSD 6.2-RELEASE to make a logical network interface out of two physical interfaces. This is referred to as bonding on Linux, IP Multipathing on Solaris and I think Cisco call it Ether Channel. Whatever way you go about it, the end result is that you get a network interface that is reachable via a multiple different paths. If each physical interface is plugged into a different switch, you get a nice amount of resiliency.</p>
<p>This works great in FreeBSD with ng_fec, however if you try to use an IPv6 address on the logical interface thats where things start to get interesting. Without getting into too much detail &#8211; the problems relate to how IPv6 maps IP addresses to MAC addresses, this is done by way of  &#8220;neighbour advertisement&#8221; messages sent via multicast. However the ng_fec driver was not telling the physical network interfaces to join the correct multicast groups so these neighbour advertisement messages could not be processed correctly, which led to very flaky and mostly unavailable IPv6 connectivity. From what I can gather, you can use other drivers in -CURRENT that don&#8217;t exhibit this problem.</p>
<p>But with some diagnoses and a patch to ng_fec.c from <a href="http://www.maths.tcd.ie/~dwmalone/">Dave Malone</a> we managed to correct the issue. This may make it up into the FreeBSD source tree at some point.</p>
<p>Hopefully things will stay stable from now on <img src='http://www.spoofedpacket.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Edit: Ah, there is a <a href="http://www.FreeBSD.org/cgi/query-pr.cgi?pr=107523">bug report</a> raised for this already.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.spoofedpacket.net/index.php/2007/05/15/ipv6-and-ng_fec/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
