Remote replication hostname requires IPv4 address to be resolvable?

matsim

Cadet
Joined
Jul 23, 2012
Messages
7
Hi

I'm replicating my own FreeNAS to a remote place at friends (and theirs to my place) and prefer IPv6 since it allows easily having peer-to-peer trafic between both FreeNAS boxes instead of fighting with a VPN tunnel and / or NAT port forwarding. (Those are the moments when you realize that IPv6 can be very convenient IMO).

I may have discovered an issue with remote replication and IPv6 only connectivity:
- FreeNAS version: 11.2-U7
- Both boxes update their AAAA DNS hourly with a small script that parses ifconfig and updates the DNS record if needed at my DNS provider (simple Cron Job in FreeNAS)
- Now set up a remote replication based on the FQDN
- Fetch the SSH key in the GUI (works without any IPv4 being resolvable)
- Hit Save, instead of success, get: "Couldn't resolve hostname" (even though the remote system is perfectly resolves to an IPv6 address)

Now to trick the source FreeNAS system to still accept the job and yet still use IPv6: Temporarily add an IPv4 record for the target FreeNAS FQDN before hitting save in the source system's /etc/hosts. Now since the source system has the IPv4 address resolvable, it accepts the job.

Afterwards the record in /etc/hosts can be removed or disabled again. Every change on this replication tasks require repeating the same trickery.

Replication seems to prefer IPv4 over IPv6 if an IPv4 address can be resolved (tested locally with a test system) so it's only when the replication has ended and the next job starts and the entry /etc/hosts is removed/disabled IPv6 is then used instead of IPv4.

I guess the code should check the presence of both IPv4 and IPv6 record and should first prefer IPv6 over IPv4. Or am I looking at it from the wrong angle? :smile:

Anyway: The workaround via /etc/hosts seems to work for me and I have to say that remote replication is really handy in my use case!
 

artlessknave

Wizard
Joined
Oct 29, 2016
Messages
1,506
ipv6 has had very limited penetration into the market, NAT allieviates most of the ipv4 problems, and not enough people or companies care enough to bother upgrading most of the infrastructure when everything already works
 
Top