P2P: Node with onlynet=ipv6 connects outgoing to Onion #13378

issue ghost openend this issue on June 3, 2018
  1. ghost commented at 1:09 pm on June 3, 2018: none

    Running bitcoind 0.16.1rc1 64-Bit binary release on Linux

    What I did

    I have now setup IPv6 connection for my node (but only outgoing, since my providers router does not allow incoming IPv6 traffic…) I have running also Tor on localhost with bitcoin (not really) “hidden” service, in parallel to IPv4.

    So I was curious and set onlynet=ipv6 in bitcoin.conf (before, “onlynet” was not set)

    Expected behavior

    Only IPv6 connections, both incoming and outgoing, no Tor traffic, no traffic to local Tor hidden service.

    Actual behavior

    Node connects to IPv6, IPv4 and Tor, see screenshot of GUI debug window connection tab.

    Also, there are error messages in the debug log that I had not before: (“Keine Berechtigung” means “No permission” in English)

    2018-06-03 12:41:46 Loaded 71277 addresses from peers.dat 324ms 2018-06-03 12:41:46 init message: Lade Sperrliste… 2018-06-03 12:41:46 init message: Starte Netzwerk-Threads… 2018-06-03 12:41:46 init message: Laden abgeschlossen 2018-06-03 12:41:46 opencon thread start 2018-06-03 12:41:46 net thread start 2018-06-03 12:41:46 dnsseed thread start 2018-06-03 12:41:46 addcon thread start 2018-06-03 12:41:46 msghand thread start 2018-06-03 12:41:46 GUI: Platform customization: “other” 2018-06-03 12:41:46 GUI: PaymentServer::LoadRootCAs: Loaded 159 root certificates 2018-06-03 12:41:55 Imported mempool transactions from disk: 2019 succeeded, 0 failed, 0 expired, 0 already there 2018-06-03 12:41:57 Loading addresses from DNS seeds (could take a while) 2018-06-03 12:41:57 219 addresses found from DNS seeds 2018-06-03 12:41:57 dnsseed thread exit 2018-06-03 12:42:07 New outbound peer connected: version: 70015, blocks=525773, peer=0 2018-06-03 12:44:06 GUI: QAccessibleTable::child: Invalid index at: 3 0 2018-06-03 12:44:06 GUI: Cannot creat accessible child interface for object: QTableView(0x55960b4b1040, name = “peerWidget”) index: 29 2018-06-03 12:44:06 GUI: QAccessibleTable::child: Invalid index at: 3 0 2018-06-03 12:44:06 GUI: Cannot creat accessible child interface for object: QTableView(0x55960b4b1040, name = “peerWidget”) index: 29 2018-06-03 12:44:06 GUI: QAccessibleTable::child: Invalid index at: 3 0 2018-06-03 12:44:06 GUI: Cannot creat accessible child interface for object: QTableView(0x55960b4b1040, name = “peerWidget”) index: 29 2018-06-03 12:44:11 GUI: QAccessibleTable::child: Invalid index at: 2 0 2018-06-03 12:44:11 GUI: Cannot creat accessible child interface for object: QTableView(0x55960b4b1040, name = “peerWidget”) index: 22 2018-06-03 12:44:11 GUI: QAccessibleTable::child: Invalid index at: 2 0 2018-06-03 12:44:11 GUI: Cannot creat accessible child interface for object: QTableView(0x55960b4b1040, name = “peerWidget”) index: 22 2018-06-03 12:44:11 GUI: QAccessibleTable::child: Invalid index at: 2 0 2018-06-03 12:44:11 GUI: Cannot creat accessible child interface for object: QTableView(0x55960b4b1040, name = “peerWidget”) index: 22 2018-06-03 12:44:51 connect() to [2601:98a:4203:6e9d:68b9:19cf:e683:6932]:8333 failed after select(): Keine Berechtigung (13) 2018-06-03 12:45:33 connect() to [2a00:c1a0:4888:a500:cc5b:3e64:8aba:d6b4]:8333 failed after select(): Keine Berechtigung (13) 2018-06-03 12:45:38 connect() to [2001:981:9cae:1:7c4b:8f56:ab7c:78f]:8333 failed after select(): Keine Berechtigung (13)

    bildschirmfoto

  2. fanquake added the label P2P on Jun 3, 2018
  3. ghost commented at 3:39 pm on June 7, 2018: none

    When setting onlynet=ipv4 there are outgoing connections to .onion addresses, too.

    The bitcoind man page says:

    -onlynet= Only connect to nodes in network (ipv4, ipv6 or onion)

    Additionally, I get incoming connections via Tor Hidden Service with both onlynet=ipv6 and onlynet=ipv4.

    If this should be not a bug, but a feature, the man page should explain this behaviour more detailed and precisely.

    I am wondering, that there is no feedback yet about this behavior. I think it is easy reproducable.

  4. sipa commented at 3:41 pm on June 7, 2018: member
    Onlynet only affects outgoing connections, not incoming.
  5. ghost commented at 6:29 pm on June 7, 2018: none

    Thanks for feedback. Following this, I would suggest to change the man page text to:

    0onlynet=
    1Actively connect to remote nodes exclusively in network <ipv4|ipv6|onion>.
    2Passive, incoming connections are not affected by this parameter.
    

    But this statement for active connections to remote nodes does not seem to match the reality, currently. Or am I missing something?

  6. sipa commented at 6:31 pm on June 7, 2018: member

    Thanks for feedback. Following this, I would suggest to change the man page text to:

    Sounds good to me. Feel free to open a PR.

    But this statement for active connections to remote nodes does not seem to match the reality, currently. Or am I missing something?

    If that’s the case, there is a bug, and we should keep this issue open to investigate. I was just commenting because the in/out distinction was a possible explanation for what you saw.

  7. kallewoof commented at 9:55 am on June 11, 2018: member

    @sipa

    Onlynet only affects outgoing connections, not incoming.

    Huh. So a onlynet=tor user may end up getting non-tor incoming connections? That sounds potentially undesirable.

    Edit: off-topic; spin off in #13436, please respond there.

  8. unknown renamed this:
    onlynet=ipv6 has no effect: Node connects to IPv6, IPv4 and Tor
    onlynet=ipv6 has no effect: Node connects outgoing to IPv6, IPv4 and Tor
    on Jun 16, 2018
  9. unknown renamed this:
    onlynet=ipv6 has no effect: Node connects outgoing to IPv6, IPv4 and Tor
    P2P: Node with onlynet=ipv6 connects outgoing to Onion
    on Jun 20, 2018
  10. ghost commented at 4:09 pm on June 20, 2018: none
    I got the node now running for 48h with onlynet=ipv6, and from looking at the connections tab from time to time, I only once saw a single outgoing connection via IPv6, so pretty seldomly. All of the other outgoing connections are to Onion addresses. I never saw an outgoing connection via IPv4.
  11. ghost commented at 5:32 pm on June 20, 2018: none
    netstat -np | grep tor shows only IPv4 connections, allthough Tor is configured with ClientUseIPv6 1, so it looks like this is not a “Onion via IPv6” phaenomen.
  12. sipa referenced this in commit 01f909828d on Jun 27, 2018
  13. PastaPastaPasta referenced this in commit 65a0077ff0 on Jul 7, 2020
  14. PastaPastaPasta referenced this in commit 7d461a1a0d on Jul 7, 2020
  15. PastaPastaPasta referenced this in commit 12a0696ecd on Jul 8, 2020
  16. ghost commented at 10:28 am on December 6, 2020: none

    Issue still exists with 0.21.0rc2, see screenshot of connection table running with onlynet=ipv6.

    bildschirmfoto

  17. ghost commented at 10:45 am on December 6, 2020: none
    There are no outgoing onion connections when additionally to onlynet=ipv6 setting listenonion=0 (default: 1). See #14425 (closed by me) and the successor PR #19358
  18. ghost commented at 11:25 am on August 9, 2021: none
    Check if this is solved by #22651.
  19. vasild referenced this in commit 7b821b9d4c on Aug 30, 2021
  20. vasild referenced this in commit 0ea0de6438 on Sep 1, 2021
  21. vasild referenced this in commit 46a9a797f1 on Sep 3, 2021
  22. luke-jr referenced this in commit 93c87541f6 on Oct 10, 2021
  23. vasild referenced this in commit 8dea7fcf72 on Nov 8, 2021
  24. vasild referenced this in commit e53a8505db on Nov 24, 2021
  25. luke-jr referenced this in commit 06fc482a73 on Dec 14, 2021
  26. gades referenced this in commit 8151c6fc98 on Feb 10, 2022
  27. laanwj closed this on Mar 1, 2022

  28. laanwj referenced this in commit 848b11615b on Mar 1, 2022
  29. janus referenced this in commit 11617f9a40 on Jul 3, 2022
  30. backpacker69 referenced this in commit 3c6d35919d on Jan 18, 2023
  31. DrahtBot locked this on Mar 1, 2023

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-07-05 19:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me