Cyberduck Mountain Duck CLI

Opened 10 years ago

Closed 8 years ago

#2539 closed defect (fixed)

IPv6 has a wrong default behaviour

Reported by: anonymous Owned by: dkocher
Priority: high Milestone: 4.0
Component: core Version: 3.1.2
Severity: major Keywords: IPV6
Cc: d-r@… Architecture:
Platform:

Description (last modified by Dick)

Hi, despite the 'defaults' fix, at the moment 3.8.1 does not work with an IPv6 only SSH server, using a host name that has both A and AAAA records:

Connect to godzilla.terena.org -> Network Error: Connection failed

Connecting to the bare address (2001:610:148:dead::6) works fine. Connecting to a hostname that ONLY lists a AAAA record (godzilla.ipv6.terena.org) also works fine...

FYI this is 10.6.6.

Thanks.

Change History (17)

comment:1 Changed 10 years ago by dkocher

  • Summary changed from IPV6 to IPv6 Support

How do you conclude it does not work? I have never tested because I don't have a IPV6 network here but in theory it should work for SFTP.

comment:2 Changed 10 years ago by dkocher

  • Milestone changed from 3.2 to 3.1
  • Resolution set to worksforme
  • Status changed from new to closed

I tested several IPv6 Accessible FTP Sites and haven't found any issue.

comment:3 follow-up: Changed 10 years ago by jerome@…

  • Milestone 3.1 deleted
  • Resolution worksforme deleted
  • Status changed from closed to reopened
  • Summary changed from IPv6 Support to IPv6 has a wrong default behaviour
  • Type changed from enhancement to defect
  • Version changed from 3.0.1 to 3.1.2

IPv6 support is supposed to have the following behaviour :

  • IPv6 should be tried first IF the host has an AAAA record AND localhost has a global IPv6 address (not just the local link one)
  • If both A and AAAA records are avaible for the host, AAAA should have precedence
  • UNLESS User is given explicit choice to default to IPv4

My test showed that for an host beeing reachable on both protocols, also having both A and AAAA records, Cyberduck defaults to IPv4

I couldn't find any setting to change this faulty behaviour.

When given with an IPv6 adress, cyberduck rightfully uses IPv6.

comment:4 Changed 10 years ago by d-r@…

I second that, with build 3.1.2 (4500). A is preferred over AAAA. If you need access to a testing server with both A and AAAA records or any other help with this, David, let me know. Any idea for a fix timeline? Thanks, Dominik

comment:5 Changed 10 years ago by d-r@…

  • Cc d-r@… added

comment:6 Changed 10 years ago by dkocher

  • Milestone set to 3.1.3

According to http://java.sun.com/j2se/1.5.0/docs/guide/net/ipv6_guide/index.html#ipv6-related which also applies to Cyberduck:

  • By default, we would prefer IPv4 addresses over IPv6 addresses, i.e., when querying the name service (e.g., DNS service), we would return IPv4 addresses ahead of IPv6 addresses.

To test IPv6 you therefore have to set the java.net.preferIPv6Addresses property to true in the Info.plist of Cyberduck.app/Contents.

Using Passive FTP there may be problems connecting, as we do not currently support the IPv6 FTP extensions to parse a IPv6 address in response to PASV.

comment:7 follow-up: Changed 10 years ago by d-r@…

Thanks for the update, David. I tried your suggestion. Following this document (http://developer.apple.com/documentation/Java/Reference/Java_InfoplistRef/Articles/JavaDictionaryInfo.plistKeys.html), in the Info.plist, I created a dictionary Properties as a child of the dictionary Java, then a child key java.net.preferIPv6Addresses and set it to a string true. Unfortunately, it looks like Cyberduck still prefers IPv4. What should the Info.plist look like in order to get that to work? Did you try it out yourself?

Regarding the PASV problems, I can confirm them. It fails for example when using an explicit IPv6 address. From my point of view, that's not such a high priority issue as PASV mode could be less urgently required when you use IPv6.

comment:8 in reply to: ↑ 7 Changed 10 years ago by dkocher

Replying to d-r@…: I cannot verify this before Monday. As another option try using the key VMOptions with <string>-Djava.net.preferIPv6Addresses=true</string>. See trunk/Info.plist.debug as a reference.

comment:9 follow-up: Changed 10 years ago by d-r@…

That trick worked, now the connection is made to the IPv6 address, that's good. But it looks like a Bookmark's Active/Passive Setting is ignored. That's why LS works, but transfers always fail with "Cannot assign address".

comment:10 in reply to: ↑ 9 Changed 10 years ago by dkocher

See #2885 for related issue.

comment:11 follow-up: Changed 10 years ago by dkocher

We now have support for EPSV and EPRT as of r4506.

comment:12 in reply to: ↑ 3 Changed 10 years ago by dkocher

Replying to jerome@…:

IPv6 support is supposed to have the following behaviour :

  • IPv6 should be tried first IF the host has an AAAA record AND localhost has a global IPv6 address (not just the local link one)
  • If both A and AAAA records are avaible for the host, AAAA should have precedence
  • UNLESS User is given explicit choice to default to IPv4

My test showed that for an host beeing reachable on both protocols, also having both A and AAAA records, Cyberduck defaults to IPv4

I couldn't find any setting to change this faulty behaviour.

When given with an IPv6 adress, cyberduck rightfully uses IPv6.

Can you direct me to the RFCs describing this? At my own setup this scenario not usable: With the java.net.preferIPv6Addresses property described above the AAAA takes precedence but I have no IPv6 routing connecting to the address therefore fails.

comment:13 in reply to: ↑ 11 Changed 10 years ago by dkocher

Replying to dkocher:

We now have support for EPSV and EPRT as of r4506.

The nightly build is now available.

comment:14 Changed 10 years ago by d-r@…

I tested the nightly, works for me. Great! Thanks a lot, good work. I had to apply the address selection tweak, but then it works nicely against a ProFTPd server.

Regarding address selection, according to this article [1] it should be RFC 3484.

[1] http://www.cisco.com/web/about/ac123/ac147/archived_issues/ipj_9-3/ipv6_internals.html

comment:15 Changed 10 years ago by dkocher

  • Resolution set to fixed
  • Status changed from reopened to closed

I will not currently change the default behaviour. However you can change the preference using the defaults command in Terminal.app to give IPv6 AAAA records preference when connecting. Use

defaults write ch.sudo.cyberduck connection.dns.ipv6 true

This allows you to change the configuration without editing the Info.plist. As of r4522.

comment:16 Changed 8 years ago by Dick

  • Description modified (diff)
  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:17 Changed 8 years ago by dkocher

  • Milestone changed from 3.2 to 4.0
  • Resolution set to fixed
  • Status changed from reopened to closed

In r8332.

Note: See TracTickets for help on using tickets.
swiss made software