{"id":144,"date":"2016-01-30T11:43:17","date_gmt":"2016-01-30T11:43:17","guid":{"rendered":"http:\/\/www.aixperts.co.uk\/?p=144"},"modified":"2016-01-30T13:13:40","modified_gmt":"2016-01-30T13:13:40","slug":"dhcpv6-and-finding-duid","status":"publish","type":"post","link":"https:\/\/www.aixperts.co.uk\/?p=144","title":{"rendered":"DHCPv6 and finding DUID"},"content":{"rendered":"<p>As you probably know if you are using IPv6 at home, Privacy Extentions are a pain, Apple devices are a pain, &#8220;smart&#8221; phones are a pain, etc.<\/p>\n<p>The problem is that privacy extentions makes it impossible to set-up as firewall and generally keep an eye on what goes on on your network.<\/p>\n<p>There is a trick though, to finding DUIDs of devices that won&#8217;t tell you, so you can set-up DHCPv6 on your network! This article assumes you already have ISC&#8217;s DHCPv6 server configured and running. I might cover that in another post some time, although that can just be Googled unlike how to find DUIDs.<\/p>\n<p>Here&#8217;s the trick. In your dhcpd6.conf, insert the following at the beginning, to change the log configuration:<\/p>\n<p><em>log-facility local7;<\/em><br \/>\n<em> option dhcp6.macaddr code 193 = string;<\/em><br \/>\n<em> option dhcp6.leased-address code 194 = string;<\/em><br \/>\n<em> option dhcp6.macaddr = binary-to-ascii(16, 8, &#8220;:&#8221;, suffix(option dhcp6.client-id, 6));<\/em><br \/>\n<em> option dhcp6.leased-address = binary-to-ascii(16,16, &#8220;:&#8221;, substring(suffix(option dhcp6.ia-na, 24),0,16));<\/em><br \/>\n<em> log (info, concat (&#8220;Lease for &#8220;,config-option dhcp6.leased-address, &#8221; leased to &#8220;, config-option dhcp6.macaddr, &#8221; DUID: &#8220;,\u00a0 binary-to-ascii(16, 8, &#8220;:&#8221;, option dhcp6.client-id)));<\/em><\/p>\n<p>The last line, the one beginning with &#8220;log&#8221;, has this at the end:<\/p>\n<p>binary-to-ascii(16, 8, &#8220;:&#8221;, option dhcp6.client-id)<\/p>\n<p>which it what puts the DUID in your log file whenever it receives a request. Now all you need to do is check your DHCPv6 log file!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As you probably know if you are using IPv6 at home, Privacy Extentions are a pain, Apple devices are a pain, &#8220;smart&#8221; phones are a pain, etc. The problem is that privacy extentions makes it impossible to set-up as firewall &hellip; <a href=\"https:\/\/www.aixperts.co.uk\/?p=144\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[12,13,15,14,16],"class_list":["post-144","post","type-post","status-publish","format-standard","hentry","category-linux","tag-dhcpv6","tag-duid","tag-firewall","tag-iphone","tag-security"],"_links":{"self":[{"href":"https:\/\/www.aixperts.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/144","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.aixperts.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.aixperts.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.aixperts.co.uk\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.aixperts.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=144"}],"version-history":[{"count":2,"href":"https:\/\/www.aixperts.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/144\/revisions"}],"predecessor-version":[{"id":146,"href":"https:\/\/www.aixperts.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/144\/revisions\/146"}],"wp:attachment":[{"href":"https:\/\/www.aixperts.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=144"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.aixperts.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=144"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.aixperts.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=144"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}