forked from bitcoin/bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
backport: merge bitcoin#21845, #22732, #23542, #24468, #25119, #25176, #25421, #26248, #26199, #27036, #27270, partial bitcoin#27106 (networking backports: part 10) #6532
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
06a8e9c
merge bitcoin#21845: Don't require locking cs_main before calling Rel…
kwvg 8e2a12a
merge bitcoin#22732: use m_client_interface rather than uiInterface
kwvg 52c3b03
merge bitcoin#23542: open p2p connections to nodes that listen on non…
kwvg 37e0c58
merge bitcoin#24468: improve -onlynet help and related tor/i2p docume…
kwvg 1d96a47
merge bitcoin#25119: move StartExtraBlockRelayPeers() from header to …
kwvg 8782575
merge bitcoin#25176: Fix frequent -netinfo JSON errors from missing g…
kwvg 18738f5
merge bitcoin#25421: convert standalone IsSelectableSocket() and SetS…
kwvg 4b17baf
merge bitcoin#26248: Set relay in version msg to peers with relay per…
kwvg d80bbe9
merge bitcoin#26199: Don't self-advertise during version processing
kwvg f961903
merge bitcoin#27036: Remove last uses of snprintf and simplify
kwvg 75cc94e
merge bitcoin#27270: Avoid CNode::m_relays_txs usage
kwvg 3260f2c
partial bitcoin#27106: remove orphaned CSubNet::SanityCheck()
kwvg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,114 @@ | ||
| When Dash Core automatically opens outgoing P2P connections, it chooses | ||
| a peer (address and port) from its list of potential peers. This list is | ||
| populated with unchecked data gossiped over the P2P network by other peers. | ||
|
|
||
| A malicious actor may gossip an address:port where no Dash node is listening, | ||
| or one where a service is listening that is not related to the Dash network. | ||
| As a result, this service may occasionally get connection attempts from Dash | ||
| nodes. | ||
|
|
||
| "Bad" ports are ones used by services which are usually not open to the public | ||
| and usually require authentication. A connection attempt (by Dash Core, | ||
| trying to connect because it thinks there is a Dash node on that | ||
| address:port) to such service may be considered a malicious action by an | ||
| ultra-paranoid administrator. An example for such a port is 22 (ssh). On the | ||
| other hand, connection attempts to public services that usually do not require | ||
| authentication are unlikely to be considered a malicious action, | ||
| e.g. port 80 (http). | ||
|
|
||
| Below is a list of "bad" ports which Dash Core avoids when choosing a peer to | ||
| connect to. If a node is listening on such a port, it will likely receive fewer | ||
| incoming connections. | ||
|
|
||
| 1: tcpmux | ||
| 7: echo | ||
| 9: discard | ||
| 11: systat | ||
| 13: daytime | ||
| 15: netstat | ||
| 17: qotd | ||
| 19: chargen | ||
| 20: ftp data | ||
| 21: ftp access | ||
| 22: ssh | ||
| 23: telnet | ||
| 25: smtp | ||
| 37: time | ||
| 42: name | ||
| 43: nicname | ||
| 53: domain | ||
| 69: tftp | ||
| 77: priv-rjs | ||
| 79: finger | ||
| 87: ttylink | ||
| 95: supdup | ||
| 101: hostname | ||
| 102: iso-tsap | ||
| 103: gppitnp | ||
| 104: acr-nema | ||
| 109: pop2 | ||
| 110: pop3 | ||
| 111: sunrpc | ||
| 113: auth | ||
| 115: sftp | ||
| 117: uucp-path | ||
| 119: nntp | ||
| 123: NTP | ||
| 135: loc-srv /epmap | ||
| 137: netbios | ||
| 139: netbios | ||
| 143: imap2 | ||
| 161: snmp | ||
| 179: BGP | ||
| 389: ldap | ||
| 427: SLP (Also used by Apple Filing Protocol) | ||
| 465: smtp+ssl | ||
| 512: print / exec | ||
| 513: login | ||
| 514: shell | ||
| 515: printer | ||
| 526: tempo | ||
| 530: courier | ||
| 531: chat | ||
| 532: netnews | ||
| 540: uucp | ||
| 548: AFP (Apple Filing Protocol) | ||
| 554: rtsp | ||
| 556: remotefs | ||
| 563: nntp+ssl | ||
| 587: smtp (rfc6409) | ||
| 601: syslog-conn (rfc3195) | ||
| 636: ldap+ssl | ||
| 989: ftps-data | ||
| 990: ftps | ||
| 993: ldap+ssl | ||
| 995: pop3+ssl | ||
| 1719: h323gatestat | ||
| 1720: h323hostcall | ||
| 1723: pptp | ||
| 2049: nfs | ||
| 3659: apple-sasl / PasswordServer | ||
| 4045: lockd | ||
| 5060: sip | ||
| 5061: sips | ||
| 6000: X11 | ||
| 6566: sane-port | ||
| 6665: Alternate IRC | ||
| 6666: Alternate IRC | ||
| 6667: Standard IRC | ||
| 6668: Alternate IRC | ||
| 6669: Alternate IRC | ||
| 6697: IRC + TLS | ||
| 10080: Amanda | ||
|
|
||
| For further information see: | ||
|
|
||
| [pull/23306](https://github.com/bitcoin/bitcoin/pull/23306#issuecomment-947516736) | ||
|
|
||
| [pull/23542](https://github.com/bitcoin/bitcoin/pull/23542) | ||
|
|
||
| [fetch.spec.whatwg.org](https://fetch.spec.whatwg.org/#port-blocking) | ||
|
|
||
| [chromium.googlesource.com](https://chromium.googlesource.com/chromium/src.git/+/refs/heads/main/net/base/port_util.cc) | ||
|
|
||
| [hg.mozilla.org](https://hg.mozilla.org/mozilla-central/file/tip/netwerk/base/nsIOService.cpp) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.