You are not logged in.

#1 2014-03-18 10:58:06

itti
Member
Registered: 2007-06-01
Posts: 76

Dynamic DNS for ipv4 AND ipv6?

tl;dr: do you know any dynamic dns service and updater daemon that supports both ipv4 and ipv6?

Hi,

ever since my provider supplied me with a proper dual stack account (real ipv4, real ipv6) for internet access I got some kind of little problem regarding the services I host at home. So this is mainly about email. I have a server sitting behind my router that has an open submission and IMAPS port. For ipv4 I've been using the NAT and dyndns features of my router (fritzbox) without any problem. For ipv6 there is no NAT (at least as far as my router is concerned). What I can do though is to open the firewall for incoming ports dynamically based on the interface identifier. So if someone wants to connect to an ipv6 address that would map to my server the router knows to not block the traffic. For this to work though I need update a dynamic DNS record with the public ipv6 address that my server gets to use (something out of the prefix my provider assignes me). This server is an arch linux box. I tried to use inadyn-mt with some systemd unit file I found through google but this does not seem to work right. When I'm in ipv4-only networks (on a mobile connection for example) I often can't resolve the right ip address of my server through dyndns. The thing is that my server doesn't know about a changed ipv4 address because this is handled by the router. It does only know about when his own ipv6 address changes/expires. Based on when this happens inadyn-mt might fire an update to dyndns and with that also pick up the new ipv4 address, but this is not guaranteed.

Any suggenstions, tool and/or service proposals? Is there a way dns-wise to add a CNAME alias just for A records and not for AAAA?

Offline

#2 2014-04-16 10:38:44

Ibex
Member
Registered: 2006-03-02
Posts: 127

Re: Dynamic DNS for ipv4 AND ipv6?

I currently use cloudflare as the DNS servers for my domain as it's free and allows to update certain records with their API. I only use it for IPv4, but since they support AAAA records, I assume it will work for IPv6 just as well. It should be quite simple for you to update the script to get the ip of a given interface instead of fetching it from the net.

#!/bin/sh
# modified by jfro from http://www.cnysupport.com/index.php/linode-dynamic-dns-ddns-update-script
# Uses curl to be compatible with machines that don't have wget by default
# modified by Ross Hosman for use with cloudflare.

cfkey=<your api key>
cfuser=<your username>
cfhost=<hostname you want to update>

WAN_IP=`curl -s http://icanhazip.com/`
if [ -f $HOME/.wan_ip-cf.txt ]; then
        OLD_WAN_IP=`cat $HOME/.wan_ip-cf.txt`
else
        OLD_WAN_IP=""
fi

perl -i -pe 'chomp if eof' /var/log/cfclient.log
if [ "$WAN_IP" = "$OLD_WAN_IP" ]; then
        echo -ne "." >> /var/log/cfclient.log
else
        echo $WAN_IP > $HOME/.wan_ip-cf.txt
        echo -ne "\nUpdating IP to $WAN_IP\n" >> /var/log/cfclient.log
	curl -s https://www.cloudflare.com/api.html?a=DIUP\&hosts="$cfhost"\&u="$cfuser"\&tkn="$cfkey"\&ip="$WAN_IP" >> /var/log/cfclient.log
fi
echo -ne "\n" >> /var/log/cfclient.log

Offline

#3 2014-04-16 13:06:37

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 6,184

Re: Dynamic DNS for ipv4 AND ipv6?

itti,
are you sure you need DYNAMIC dns for ipv6 ?

My provider (xs4all.nl) gives me a ipv6 subnet like this : abcd:efgh::ijkl/48 .
All adresses in that subnet are free for me to use, and they are global addresses that should be accessible from everywhere.


Booting with apg Openrc, NOT systemd.
Automounting : not needed, i prefer pmount
Aur helpers : makepkg + my own local repo === rarely need them

Offline

#4 2014-08-29 13:58:06

notrix
Member
Registered: 2014-08-29
Posts: 1

Re: Dynamic DNS for ipv4 AND ipv6?

i think the best combination between dynamic dns and ipv6 is https://www.duiadns.net. it's free also!

Offline

Board footer

Powered by FluxBB