--rc; Listening on IPv4+v6 Socket instead only IPv4

What is the problem you are having with rclone?

I expect that rclone listen only on an IPv4 Socket.

What is your rclone version (output from rclone version)

rclone v1.56.0-DEV

  • os/version: unknown
  • os/kernel: 3.10.108 (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.17
  • go/linking: static
  • go/tags: none

Which OS you are using and how many bits (eg Windows 7, 64 bit)

DSM 7, Linux, Kernel 3.10.108, 64-bit

Which cloud storage system are you using? (eg Google Drive)

Google Drive, but doesn't matter

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone copy GoogleDrive: /local --rc --rc-addr 0.0.0.0:5572
sudo netstat -nl | grep :5572
Password: 
tcp6       0      0 :::5572                 :::*                    LISTEN 

Yes, it listens on both IPv4 and IPv6. This one is related, I think its the same library (httplib) that handles rc:

It's really a non issue as new kernels have IPV6 enabled. It listens on both and if you have only IPV4 traffic, it will communicate via that.

Are you seeing any issues?

It could potentially be an issue 'cos IPv4 and IPv6 have different firewalls, routing rules, etc. Someone who is dual stacked may find it's exposing a port to the internet on IPv6 that shouldn't be.

Also it breaks the principle of least surprise; if the user says 0.0.0.0 then they specifically are asking for IP4. :::12345 would be both stacks.

Sure but if I really didn't want IPV6, I would disable on the server (which is what I do since Verizon FIOS doesn't support IPV6).

Do you think someone mixes IPV4 and IPV6 on the same server with separate rules/routing (not being sarcastic as I don't have any IPV6) and am curious if folks do that or not?

My home network (also FIOS) is dual stacked with a HEnet tunnel to provide the IPv6 connectivity. This means my home servers are reachable directly from the internet over IPv6 but not on IPv4 ('cos of NAT requirements). iptables and ip6tables are managed independently on Linux. Building a home router · Ramblings of a Unix Geek

My colo VMs also are dual stacked ('cos the providers support that) so those different iptable rules are important.

I also have IPv4 tunnels between various servers.

(I know; I'm not normal :-))

When I ask for an IPv4 address I expect an IPv4 address, not an IPv6 address.

(This bug doesn't impact me 'cos I don't use rclone as a server, but I do consider it a bug).

I would never accuse you of being normal :slight_smile:

Yep, it definitely is a bug.

This behaviour comes from the Go standard library which rclone uses...

I made an issue here

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.