{"id":1387,"date":"2017-06-19T20:28:39","date_gmt":"2017-06-19T19:28:39","guid":{"rendered":"https:\/\/www.phillips321.co.uk\/?p=1387"},"modified":"2017-06-19T20:40:05","modified_gmt":"2017-06-19T19:40:05","slug":"ipv6-locallink-to-ipv4-scanning-tool","status":"publish","type":"post","link":"https:\/\/www.phillips321.co.uk\/2017\/06\/19\/ipv6-locallink-to-ipv4-scanning-tool\/","title":{"rendered":"IPv6 LocalLink to IPv4 scanning tool"},"content":{"rendered":"<p>The other weekend I wrote some notes on how to <a href=\"https:\/\/www.phillips321.co.uk\/2017\/04\/29\/netkit-ipv6-test-lab\/\" target=\"_blank\">quickly spin up an IPv6 test lab<\/a>. The idea for this was to allow me to write a custom tool to enumerate hosts that respond to IPv6 neighbour discovery on my local network. I then wanted that tool to identify the corresponding IPv4 address for that host (if there is one). And finally, identify if the IPv6 address is a router as it responds to Router Solicitation requests.<\/p>\n<p><a href=\"https:\/\/www.phillips321.co.uk\/wp-content\/uploads\/2017\/06\/Usage.png\"><img loading=\"lazy\" src=\"https:\/\/www.phillips321.co.uk\/wp-content\/uploads\/2017\/06\/Usage-300x54.png\" alt=\"\" width=\"300\" height=\"54\" class=\"aligncenter size-medium wp-image-1388\" srcset=\"https:\/\/www.phillips321.co.uk\/wp-content\/uploads\/2017\/06\/Usage-300x54.png 300w, https:\/\/www.phillips321.co.uk\/wp-content\/uploads\/2017\/06\/Usage.png 403w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>I wanted to do this with minimal dependencies, the only one currently is arp-scan, however there&#8217;s the likelihood that I can remove this dependency by coding it manually in the future. I&#8217;ve purposely not coded with <a href=\"https:\/\/tools.ietf.org\/html\/rfc4862\" target=\"_blank\">RFC4862<\/a> in mind as SLAAC (Stateless Address Autoconfiguration) as some devices <a href=\"https:\/\/slaptijack.com\/networking\/osx-disable-ipv6-address-privacy.html\" target=\"_blank\">such as OS X<\/a> adhere to <a href=\"https:\/\/tools.ietf.org\/html\/rfc4941\" target=\"_blank\">RFC4941<\/a> and randomise the link local address as a privacy feature.<\/p>\n<p>Another thing I wanted to ensure was that this tool worked on both OS X and Linux, so I&#8217;ve tried to ensure that&#8217;s the case.<\/p>\n<p>I&#8217;m not one for writing much, so here&#8217;s an example run as a picture describes a thousand words:<br \/>\n<a href=\"https:\/\/www.phillips321.co.uk\/wp-content\/uploads\/2017\/06\/Example.png\"><img loading=\"lazy\" src=\"https:\/\/www.phillips321.co.uk\/wp-content\/uploads\/2017\/06\/Example-300x109.png\" alt=\"\" width=\"300\" height=\"109\" class=\"aligncenter size-medium wp-image-1389\" srcset=\"https:\/\/www.phillips321.co.uk\/wp-content\/uploads\/2017\/06\/Example-300x109.png 300w, https:\/\/www.phillips321.co.uk\/wp-content\/uploads\/2017\/06\/Example-768x280.png 768w, https:\/\/www.phillips321.co.uk\/wp-content\/uploads\/2017\/06\/Example.png 815w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>One thing to note, this works for IPv6 to IPv4, if the host doesn&#8217;t have an IPv6 address it won&#8217;t be shown in the list&#8230;<\/p>\n<p>The code can be found here for those that want it: <a href=\"https:\/\/github.com\/phillips321\/phillips321\/blob\/master\/ipv6finder.sh\" target=\"_blank\">https:\/\/github.com\/phillips321\/phillips321\/blob\/master\/ipv6finder.sh<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The other weekend I wrote some notes on how to quickly spin up an IPv6 test lab. The idea for this was to allow me to write a custom tool to enumerate hosts that respond to IPv6 neighbour discovery on my local network. I then wanted that tool to identify the corresponding IPv4 address for [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1388,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[416,477,470,5,438,476,454,475],"_links":{"self":[{"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/posts\/1387"}],"collection":[{"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/comments?post=1387"}],"version-history":[{"count":8,"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/posts\/1387\/revisions"}],"predecessor-version":[{"id":1397,"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/posts\/1387\/revisions\/1397"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/media\/1388"}],"wp:attachment":[{"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/media?parent=1387"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/categories?post=1387"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/tags?post=1387"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}