4

With Bitcoin and Ethereum in the news so much I started to look into peer to peer networks more. My question is, do most of the people running full Bitcoin or Ether nodes have to open port 8333 to the public internet? Or is it possible to use something like UDP hole punching to make them work without this extra step.

i.e. does the average Bitcoin enthusiast who installs the program on his work computer get a real accessible TCP ip and port other people can access? Or, it almost always involves configuring a router to say port 8333 goes to that specific computer. Same question for home computers since they have NAT systems as well these days.

1 Answer 1

3
+350

Cryptocurrency products use the following TCP ports (not UDP):

  • Bitcoin : 8333
  • Bitcoin Testnet : 18333
  • Litecoin: 9333
  • Dash: 9999
  • Dogecoin: 22556
  • Ethereum: 30303

This port is only used for full nodes which do validations of transactions and blocks for Internet clients, but are not required for non-validating lightweight clients.

Full nodes are defined as:

full node is a program that fully validates transactions and blocks. Almost all full nodes also help the network by accepting transactions and blocks from other full nodes, validating those transactions and blocks, and then relaying them to further full nodes.

Most full nodes also serve lightweight clients by allowing them to transmit their transactions to the network and by notifying them when a transaction affects their wallet. If not enough nodes perform this function, clients won’t be able to connect through the peer-to-peer network—they’ll have to use centralized services instead.

When Bitcoin Core starts, it establishes 8 outbound connections to other full nodes so it can download the latest blocks and transactions. If you just want to use your full node as a wallet, you don’t need more than these 8 connections—but if you want to support lightweight clients and other full nodes on the network, you must allow inbound connections.

Some products use Universal Plug and Play (uPnP) to automatically open this port in the router. Most (but not all) routers do support it, otherwise manual configuration of the router is required to open the port and Port Forward it to the computer on which the node is running.

The port can usually also be configured as another number for most of the products by local configuration. This requires using Port Forwarding on the router to transmit the known external port to the locally configured one on the computer.

References :

4
  • 1
    thank you, great answer, I also found this dirkmittler.homeip.net/blog/archives/3340 after searching for uPnP. So uPnP is totally different from UDP Hole Punching huh? Commented Oct 22, 2017 at 23:04
  • They are not the same thing. A good article can be found here. Most such P2P programs also try to vary the geographical locations of their sources in order to avoid closed circles - imagine 9 Bitcoin full nodes, each connecting with the 8 others and so unable to connect with the rest of the world and to validate nothing.
    – harrymc
    Commented Oct 23, 2017 at 6:40
  • okay then this paper brynosaurus.com/pub/net/p2pnat is often cited as how some networks work, but it doesn't mention uPnP at all. Is this paper just theory then and uPnP is reality? Commented Oct 23, 2017 at 17:15
  • This is a good paper dealing with possible network configurations. It does not deal with the technical part of how the connections are made via router ports but with higher levels. The hole punching section is correct and there are P2P programs that use it over UDP, mostly some torrent clients, but no cryptocurrency products. Cryptocurrency products use TCP, and hole punching over it is not reliable, while these products need to be very reliable. TCP is more suitable because it's reliable, ordered, and error-checked.
    – harrymc
    Commented Oct 23, 2017 at 17:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .