Bitcoin-Core P2P Client Has UPnP.

I use a Bitcoin client, which is called “Bitcoin Core“. This is a version of Bitcoin, based on Peer-To-Peer protocols. This version of the wallet-program should not be confused with the Android version, which some people have on their phones, and which is Not P2P.

Several people who use the P2P version of this wallet-program, which builds our local copy, of the global block-chain, on a zero-trust basis, have observed that they leave their client running 24/7, yet that they do not seem to be functioning as a full peer. As a full peer, their computer can act to facilitate Bitcoin transfers. Even when not being used as a full peer, this version of the program will connect with up to 8 other peers – using outbound connections – and will use these connections to keep its internal version of the block-chain – and therefore their wallet – synced with the rest of the network.

So after some time, what people may simply ask is, ‘Why don’t I receive incoming connections, from other wallets, expecting me to help complete their transactions?’ This would be a reasonable question, yet gurus elsewhere have given a wrong answer.

In general, this P2P Node needs to listen on TCP Port 8333. Therefore, what some people expect, is that they need to establish a port-forwarding rule on their router, which forwards TCP Port 8333 to whichever machine on the LAN is running Bitcoin Core. The advice has sometimes been given, that if you forward this port, you will start receiving massive numbers of inbound connections, and will become useful to the network.

There’s a slight problem with this version of an explanation. Bitcoin Core has the ability to use ‘UPnP’, which is also known as “Universal Plug-And-Play”. What UPnP does, is allow individual clients of our LAN to open a required port on the WAN-side of the router, such as TCP Port 8333 if need be. Because some users believe that enabling UPnP on their routers, makes their routers ineffective as a firewall, they disable this feature. This would be, because those users cannot even trust their LAN-clients, in which case the LAN-clients could trivially request forwarding rules, which the operators of such a LAN did not authorize.

The problem I see, is that I, personally, have UPnP enabled on my router, because I believe my actual LAN-clients to be secure, so that according to me, if they want a WAN port number, they can have it. Also, I have UPnP enabled on my Bitcoin Core P2P / wallet-program. Therefore, the LAN-client in question is requesting this Port 8333, and is obtaining it. Yet, I still don’t see a wealth of inbound connections asking for my CPU time.


There could be several reasons for this, one of which might have been, that a software-firewall on the client-machine in question could be blocking Port 8333. But I, personally have checked my software-firewall. It tells me that it is allowing all connections to and from my Bitcoin Core client a-okay. Maybe the firewall of some other participant is not?

Answer: The Windows computer my Bitcoin Core client is running on, had the LAN connection set to Public. According to Windows firewall rules, access to this program on the host machine is only granted when the network would be Private. This is to allow quick access to Public networks, which are not trusted, without reconfiguring the computer, while setting up a more-liberal set of rules for Private networks. Changing the network-type to Private seems to have solved this problem.

With certainty, my Bitcoin Core client will not show me any transactions it has facilitated, because those transactions do not affect my wallet. Bitcoin is designed to be anonymous, so that I will only see transactions which affect my own balance.



One Caveat of using Bitcoin-Core

I happen to own some Bitcoins. But I also happen to be a person, who has never bought anything with them. Maybe this is partially because, officially, Bitcoin was not recognized as a currency in Canada or the USA. I bought the Bitcoins a long time ago, with the hope of watching their value increase – which it did – and then being able to continue owning them.

And we have a variety of Bitcoin Wallets to choose between. I began by choosing “Bitcoin Core” as my Wallet. This particular Bitcoin Client has as feature, to be able to support the Peer-2-Peer infrastructure, should other clients want to negotiate transactions, while mine is visible as a potential server for those to connect to. Further, I chose to set this one up “On A Zero-Trust Basis”. The way most Bitcoin Wallets work, they simply connect to a dedicated server, and accept whatever data that Peer offers. A Peer based on zero-trust cannot do that, but needs to find the first Bitcoin-transaction that ever occurred, and needs to download all the transactions that took place since then, to verify the integrity of all those blocks, and eventually to determine the integrity of our own Wallet.

(Edit 10/07/2016 : This is an option which Bitcoin Core gives us when we set it up for the first time. Not all the instances are set up this way, the alternative being the quicker, recommended, Automatic Connection option.)

Obviously, we would not choose to install it this way on our Smart-Phone, since it produces long delays if told to connect, after long periods of inactivity. And I did not choose this approach due to mistrust. I chose this approach, because it was the most powerful version of the software, still within my practical reach. And I still live in an era, where users want their computers to have far more power, than we really need. Further, this version of the software does not provide the user with a GUI, from which he could actually display all those anonymous transactions and Bitcoin-Addresses, as if to investigate them. But this also suits me well, as such a transaction history would be meaningless for me just to look at.

But if the need comes up, to migrate all the critical data off a Hard-Drive, let us say because the computer in question has become unstable, and if we have a Bitcoin Wallet on that HD, then we also need to transfer our Bitcoins, to a Wallet on another computer. This sounds straightforward, since one person can have as many Bitcoin Wallets as they wish, and can transfer the Bitcoins as though transferring chunks of gold, from one pouch to another.

But when I fired up my Bitcoin Wallet yesterday afternoon, around 13h00, I found out that it had fallen out-of-sync By 1 Year and 6 Weeks. It needed to recap the full transaction history that has taken place in the meantime, before giving me access to my own, meager Bitcoins.

And this happened to take, until 4h00 this morning. In the future, I will think twice before installing this one, particular type of Wallet. There are other Wallets available today, interesting in other ways.