Pixels

Nowy użytkownik
Noobie
14 Grudzień 2021
4
0
1
34
QNAP
TS-x73
Ethernet
1 GbE
Hello,

It seems my rTorrent-Pro client is unable to establish connection with IPv6-capable peers and it is currently working only with IPv4. I checked the output of netstat -tulpn and ports 6008 and 42000 are only listening on IPv4.

Is this a bug or is IPv6 broken on my rTorrent version? (0.9.8-B801)

I installed from the repo, not using qpkg.

NAS model: QNAP TS-673 running QTS 4.5.4.1787
 
Nope. It should be working. Rtorrent is compiled with IPv6 support. If it does not work you have to look for issues somewhere else. Maybe networking settings or something.

BTW: Are you using private trackers? Why do you need IPv6 torrents? Most private trackers are working on IPv4.
 
Nope. It should be working. Rtorrent is compiled with IPv6 support. If it does not work you have to look for issues somewhere else. Maybe networking settings or something.

BTW: Are you using private trackers? Why do you need IPv6 torrents? Most private trackers are working on IPv4.
Thanks for your input. My NAS is currently using a single adapter which is the default gateway and has NAT IPv4 and a public IPv6 address. But the adapter contains two IPv6 addresses, a GUA (from my ISP) and an ULA (for devices within the local network).

Maybe having two addresses is messing up with rtorrent? In any case, with IPv6 an interface is expected to have multiple addresses, so that shouldn't be a problem.

I am using both public and private trackers and I'd like to take advantage of having IPv6 connectivity to serve IPv6 peers whenever possible. That's why I am asking for it. How can I check the startup log of rtorrent? Maybe I can get more information from there.
 
Do me a favor.
Use WinSCP and connect as admin or... better way edit /usr/bin/rtorrent/etc/rtorrent.conf file with built-in to rtorrent Midnight Commander.
Bash:
/usr/bin/rtorrent/bin/mcedit /usr/bin/rtorrent/etc/rtorrent.conf
Please remove this content:
Kod:
# Lets bind correct IP address for the listening socket and outgoing connections.
# To do this we have to figure out an name of interface with IPv4 address to bind to: [qvs0|bond0|eth0|tun0]
method.insert = cfg.interface.bind, simple|private, \
    "execute.capture_nothrow=sh,-c,\"$cat=\\\"bindif=`getcfg rtorrent bind_interface_name -f /etc/config/qpkg.conf` \
                                              || bindif=`route | grep '^default' | grep -o '[^ ]*$'` ; \
                                              ifconfig 2>/dev/null | grep -q $bindif 2>/dev/null \
                                                  && echo -n $bindif \
                                                  || echo -n $(route | grep '^default' | grep -o '[^ ]*$')  \\\"\""
print = (cat, "Iface  : Default network interface : ", (cfg.interface.bind))
# Get IPv4 address of a given interface
method.insert = get_interface_ipv4_address, simple|private, \
    "execute.capture=sh,-c,\"$cat=\\\"setcfg rtorrent bind_interface_config_ipv4_addr $(ip -o -4 addr show \\\",$argument.0=,\\\" | grep -Po 'inet \\\\\\\\\\K[\\\\\\\\\\d.]+') -f /etc/config/qpkg.conf \
                                      && echo -n $(getcfg rtorrent bind_interface_config_ipv4_addr -f /etc/config/qpkg.conf)\\\"\""
# The IP address the listening socket and outgoing connections is bound to. (bind)
# (Refresh every 10 seconds)
schedule2 = set_bind_address, 0, 10, \
    "branch=((cfg.interface.bind)), \
            ((network.bind_address.set,(get_interface_ipv4_address,(cfg.interface.bind))))"
#print = (cat, "Bind IP: Get def interface IPv4addr: ", (get_interface_ipv4_address,(cfg.interface.bind)))
print = (cat, "Bind IP: Current interface IPv4addr: ", (network.bind_address))
schedule2 = print_bind_address, 0, 10, "print = (cat, \"Bind IP: Current interface IPv4addr: \", (network.bind_address))"


# The ip address reported to the tracker
# Get public IP address without the need of having dynamic DNS service, also works from behind NAT, through tunnel
method.insert = get_public_ip_address, simple|private, \
    "execute.capture_nothrow=sh,-c,\"$cat=\\\"setcfg rtorrent bind_interface_public_ipv4_addr \$(\
                                                  curl -sL --connect-timeout 2 --interface \\\", (cfg.interface.bind), \\\" http://ipinfo.io/ip || \
                                                  curl -sL --connect-timeout 2 --interface \\\", (cfg.interface.bind), \\\"  http://obj.qnapclub.pl/app/net/ip.php || \
                                                  curl -sL --connect-timeout 5 --interface \\\", (cfg.interface.bind), \\\" http://icanhazip.com || \
                                                  curl -sL --connect-timeout 5 --interface \\\", (cfg.interface.bind), \\\" http://ipinfo.io/ip || \
                                                  curl -sL --connect-timeout 10 --interface \\\", (cfg.interface.bind), \\\"  http://obj.qnapclub.pl/app/net/ip.php || \
                                                  curl -sL --connect-timeout 10 --interface \\\", (cfg.interface.bind), \\\" http://ifconfig.co || \
                                                  echo -n 127.0.0.1) -f /etc/config/qpkg.conf \
                                              && echo -n $(getcfg rtorrent bind_interface_public_ipv4_addr -f /etc/config/qpkg.conf)\\\"\""
# The IP address reported to the tracker. (ip) This handles dynamic IP's as well. Fallback to localhost for safety reasons.
# (Refresh your outgoing IP every (10)+(10+15+20)+5 extra seconds)
schedule2 = ip_tick, 0, 60, "network.local_address.set=(get_public_ip_address);print = (cat, \"New Public IP address: \", (network.local_address))"
Then restart rtorrent from SSH:
Bash:
/etc/init.d/rtorrent.sh restart
(dont use GUI since it will recreate config file from template)
Let me know if IPv6 works or not. If not then there is issue somewhere else not in rtorrent itself.
 
It seems it is not working after removing those lines. All I see are IPv4 addresses during startup. I'll look more closely and let you know if I find a solution.
Thanks for your help Silas.
 

Użytkownicy znaleźli tą stronę używając tych słów:

  1. rtorrent ipv6
  2. ipv6