pfSense Support Subscription

Author Topic: RFC 2136 DynDNS and IPv6  (Read 3171 times)

0 Members and 1 Guest are viewing this topic.

Offline flic

  • Newbie
  • *
  • Posts: 16
    • View Profile
RFC 2136 DynDNS and IPv6
« on: June 05, 2012, 01:21:48 pm »
Is there any way to hack the RFC 2136 DynDNS updater to update both the A and AAAA record?

Offline jimp

  • Administrator
  • Hero Member
  • *****
  • Posts: 14934
    • View Profile
Re: RFC 2136 DynDNS and IPv6
« Reply #1 on: June 05, 2012, 02:08:13 pm »
I don't think anyone has touched that yet. There probably is, but I don't think any of us have such a DNS setup to work/test with at the moment.

We have postponed DynDNS support for IPv6 for 2.2 because most providers simply do not support it yet. The only one we could find so far was he.net's hosted dns, the RFC method seems to get ignored a lot. :-)
Need help fast? Commercial Support!

Co-Author of pfSense: The Definitive Guide. - Check the Doc Wiki for FAQs.

Do not PM for help!

Offline flic

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: RFC 2136 DynDNS and IPv6
« Reply #2 on: June 06, 2012, 02:44:28 am »
the RFC method seems to get ignored a lot. :-)

That I've kinda noticed... :) Too bad since it's the best way to handle dynamic updates if you run your own DNS.

I'm guessing you're using nsupdate somewhere beneath the surface to get this to work? I'd love to take a peek at it if you could just point me in the right direction?

Offline jimp

  • Administrator
  • Hero Member
  • *****
  • Posts: 14934
    • View Profile
Re: RFC 2136 DynDNS and IPv6
« Reply #3 on: June 06, 2012, 07:37:52 am »
It would probably get used more if we had some good examples for people to see of the server-side setup for that. I agree it does sound like the best option if you run your own DNS.

Here's the interesting bit of the backend code:

https://github.com/bsdperimeter/pfsense/blob/master/etc/inc/services.inc#L1675
Need help fast? Commercial Support!

Co-Author of pfSense: The Definitive Guide. - Check the Doc Wiki for FAQs.

Do not PM for help!

Offline flic

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: RFC 2136 DynDNS and IPv6
« Reply #4 on: June 16, 2012, 08:15:01 am »
Thanks. I'll have a little bit of free time coming up so this will give me something to do.

Offline flic

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: RFC 2136 DynDNS and IPv6
« Reply #5 on: June 16, 2012, 09:28:50 am »
I'm sorry guys but I have no idea how to submit a patch the correct way and not the time at the moment to learn. However, if there's any interest the diff below will update the DNS record for both the A and the AAAA record if a v6 address is found on the selected interface. I hope it's of use to somebody!

Code: [Select]
1670,1671c1670
< $wanipv6 = get_interface_ipv6($dnsupdate['interface']);
< if ($wanip || $wanipv6) {
---
> if ($wanip) {
1711c1710
<
---
>
1716,1727c1715,1716
<
< if ($wanip) {
< /* IPv4 specific */
< $upinst .= "update delete {$dnsupdate['host']} A\n";
< $upinst .= "update add {$dnsupdate['host']} {$dnsupdate['ttl']} A {$wanip}\n";
< }
<
< if ($wanipv6) {
< /* IPv6 specific*/
< $upinst .= "update delete {$dnsupdate['host']} AAAA\n";
< $upinst .= "update add {$dnsupdate['host']} {$dnsupdate['ttl']} AAAA {$wanipv6}\n";
< }
---
> $upinst .= "update delete {$dnsupdate['host']} A\n";
> $upinst .= "update add {$dnsupdate['host']} {$dnsupdate['ttl']} A {$wanip}\n";
1742d1730
<

Offline databeestje

  • Administrator
  • Hero Member
  • *****
  • Posts: 1048
  • It just might be your luck day, if you only knew.
    • View Profile
Re: RFC 2136 DynDNS and IPv6
« Reply #6 on: June 17, 2012, 05:24:00 am »
I briefly looked at the dydns.class and it should be able to hook into there. Still waiting for a service provider that has a API to actually code.

I really hope that they make the update atomic and contain both a A and/or AAAA in the same update, e.g. not 2 seperate calls. This is especially true for dual stacked interfaces.

The other issue I see here is that the IPv4 and IPv6 interface can differ, e.g. your v4 is WAN and your v6 is WANv6. Need to somehow tie that in there. hmmm.

Maybe we should hook gif tunnels into the WAN dialog so that would work too. Similar to how we handle 6to4 and 6rd.

Offline yon

  • Full Member
  • ***
  • Posts: 184
    • View Profile
Re: RFC 2136 DynDNS and IPv6
« Reply #7 on: June 26, 2012, 08:29:34 am »
I have try it with simple Dns plus server lastest version. but it is seem not normal work. it is only wrong update pfsense server address to dns server.


Offline jimp

  • Administrator
  • Hero Member
  • *****
  • Posts: 14934
    • View Profile
Re: RFC 2136 DynDNS and IPv6
« Reply #8 on: June 24, 2013, 12:33:37 pm »
Resurrecting an old thread because I recently got around to setting up RFC2136 in bind and I can confirm that the IPv6 patch works, so I used a variant of it and it'll be in 2.1.
Need help fast? Commercial Support!

Co-Author of pfSense: The Definitive Guide. - Check the Doc Wiki for FAQs.

Do not PM for help!