Prevent dns leakage and disable seeding/listening with -connect #914

pull jrmithdobbs wants to merge 1 commits into bitcoin:master from jrmithdobbs:dnsseed-connect-dns-leakage changing 1 files +8 −0
  1. jrmithdobbs commented at 4:09 PM on March 3, 2012: contributor

    Prevent dns leakage and disable seeding/listening with -connect

  2. Prevent dns leakage and disable seeding/listening with -connect 9754f069c6
  3. gavinandresen commented at 4:54 PM on March 3, 2012: contributor

    ACK. I think this is the "least surprising behavior" for -connect.

  4. sipa commented at 5:00 PM on March 3, 2012: member

    ACK

  5. gmaxwell commented at 7:04 PM on March 3, 2012: contributor

    IRC is already off by default, so there is no need to set-soft it off.

    This patch will break some number of p2pool users (it would break me for example). Anyone have any thoughts about what could be done about listening which is less aggressive than shutting it off completely? I'm coming up with nothing at the moment.

  6. sipa commented at 7:08 PM on March 3, 2012: member

    Binding the p2p listening socket to 127.0.0.1, perhaps instead of not listening at all?

    EDIT: or rather, listening to the same addresses as RPC

  7. TheBlueMatt commented at 9:59 PM on March 3, 2012: member

    Dnsseed makes sense, but Im not sure I agree that nolisten (and, by extension IRC, UPnP) is the "least surprising behavior" when using -connect. If nothing, it should be clearly stated in the help options.

  8. gmaxwell commented at 11:47 PM on March 3, 2012: contributor

    Perhaps generally the nolisten behavior should be to bind only to 127.0.0.1(/same address as rpc)?

  9. TheBlueMatt commented at 2:32 AM on March 4, 2012: member

    I dont think that is the "least surprising behavior" either. (really, we should have a -bind=ip:port)

  10. sipa commented at 10:39 AM on March 4, 2012: member

    And a -allow=<netmask> as well?

  11. gavinandresen commented at 2:17 PM on March 6, 2012: contributor

    I'll defer to y'all to work this out; listening only for connections from localhost sounds interesting, although I'll just say I've regretted having subtle interactions between command-line arguments in the past and good documentation might be the best answer (either tell p2pool users to use -connect=... -listen=1 or tell others to use -connect=... -listen=0 ).

  12. laanwj commented at 7:53 AM on March 13, 2012: member

    I agree that the subtle interactions between command-line arguments can be really confusing (both to developers and users) unless it would result in clearly broken or dangerous behaviour (for example, advertising your node address when not listening). We should have clear command-line flags for these orthogonal concerns:

    • Bind to a certain port / interface, or don't listen at all. Maybe even allow bind to multiple ports/interfaces. Only request UPNP (if enabled) on interfaces we bind to.
    • Advertise your node, or don't advertise it (irrespective of the used mechanisms, be it IRC, DNS, or whatever is added in the future) for incoming connections.
    • Use peer auto-discovery (irrespective of the used mechanisms, be it IRC, DNS, or whatever is added in the future), or connect only to a certain list of nodes for outgoing connections.

    Give the user a clear error in case of obviously impossible combinations. That's the "least surprising behaviour". Don't try to make the program guess intent.

  13. sipa commented at 5:20 PM on April 8, 2012: member

    Also, we could support SOCKS4a or SOCKS5, and pass connection requests using domain names there, instead of resolving them ourselves.

  14. jgarzik commented at 7:39 PM on April 10, 2012: contributor

    Disagree with listen=0 policy enforcement in this patch.

    I have deployed configurations in the field where local mining nodes accept incoming connections from any node [on my local, firewalled network] but only -connect to specified hosts.

  15. gavinandresen closed this on Apr 21, 2012

  16. suprnurd referenced this in commit 338b0ce934 on Dec 5, 2017
  17. ptschip referenced this in commit 8c070edc7a on Jan 19, 2018
  18. lateminer referenced this in commit 5a43ea790a on Oct 30, 2019
  19. DrahtBot locked this on Sep 8, 2021

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: 2026-04-19 00:16 UTC

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