[Battlemesh] public DNS resolving IPv6 for Libre Networks hosts

Gui Iribarren gui at altermundi.net
Sat Nov 17 08:47:38 CET 2012


Hey folks,
[sorry for hijacking the battlemesh list, i'm not aware of any other
"cross-network" list for these kind of discussions?]

recent dnsmasq versions have a nifty feature called "ra-names", which
enables resolving SLAAC addresses for dual-stack hosts asking for a
DHCPv4 lease.

this immediately called my attention, and long story short, i managed
to get public, resolvable dns names pointing to dynamic hosts
connected to the WCN.

$ dig duend-hp-550.esperita.deltalibre.org.ar -taaaa @8.8.8.8 +all
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 3966
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;duend-hp-550.esperita.deltalibre.org.ar. IN AAAA

;; ANSWER SECTION:
duend-hp-550.esperita.deltalibre.org.ar. 596 IN    AAAA
2a00:1508:1:f003:21f:3cff:fed2:f86c

;; Query time: 58 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Sat Nov 17 04:14:41 2012
;; MSG SIZE  rcvd: 85

gw-esperita# date
Sat Nov 17 04:15:17 ART 2012
gw-esperita# cat /tmp/dhcp.leases
1353139433 00:1f:3c:d2:f8:6c 10.254.1.9 duend-HP-550 *

(duend-HP-550 is a neighbour's laptop currently online, esperita is
the neighbourhood, and gw-esperita is.. well.. the neighbourhood's
gateway, running openwrt+dnsmasq. Do note i'm querying 8.8.8.8.)

(if duend-hp-550 is offline, you can try ping6ing
colmena.esperita.deltalibre.org.ar)

Al (from guifi.net) picked up the idea [0] and noted that it's a
practical implementation of ideas expressed in an article by Ramon
Roca [1]

The design is missing some pieces, but dnsmasq developer liked the
idea, promising [2] to work on the features needed to round it up.

Basically, you would point your domain NS record to the dnsmasq server.
In my case, the dnsmasq server is reachable through ipv6 only, so I
had to point my registrar' records to a "dns-server-in-the-middle": a
dual-stacked bind server that receives queries on public ipv4 address
[3] and forwards them through ipv6 to my dnsmasq server [4].

Ah! I almost forget: batman-adv once again saves the day in gotham
neighbourhood, since there's only 1 dnsmasq running in the network,
centrally managing the queries broadcasted from all mesh nodes'
clients, keeping the setup brain-dead simple.

This can be though along the lines of an "end-to-end internet", or as
a "poor(?)-man-dyndns", or as a "look ma, i can finally publish things
right from my laptop, without involving geeky numbers!"

In any case, hope someone else finds the idea useful :)

Cheers,

Gui

[0]: https://lists.guifi.net/pipermail/guifi-rdes/2012-November/027035.html
[1]: http://codigosur.org/article/las-redes-libres-y-la-ipv6-como-medio-para-llegar-/
[2]: http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2012q4/006481.html
[3]: dnsrelay2.altermundi.net
[4]: gw-esperita.deltalibre.org.ar



More information about the Battlemesh mailing list