pull down to refresh

Hey, I have been struggling for a long time with this so I would be really happy if someone can help me.
My full node at home always loses all inbound connections when my public IP changes:
I thought externalip together with DynDNS would fix this but that does not seem to be the case.
This is my config:
## ## bitcoin.conf configuration file. Lines beginning with # are comments. ## # I2P i2psam=127.0.0.1:7656 i2pacceptincoming=true # accept inbound connections listen=1 externalip=***duckdns.org discover=0 upnp=1 # accept JSON-RPC commands server=1 rpcuser=bitcoin rpcpassword=*** disablewallet=1 # Enable pruning to reduce storage requirements by deleting old blocks. # This mode is incompatible with -txindex and -coinstatsindex. # 0 = default (no pruning). # 1 = allows manual pruning via RPC. # >=550 = target to stay under in MiB. prune=0 datadir=/home/bitcoin/.bitcoin txindex=1 mempoolfullrbf=1 [main] rpcport=8332 [test] rpcport=18332
Am I doing something wrong? My DynDNS is definitely working.
The only solution I can come up with that I didn't try yet is to run my node over a proxy which has a static IP. Is this how people do this?
I checked my ISP, I cannot get a static IP without a business contract.
Simply:
  • run your node on a static IP (you must buy one from your ISP)
  • run your node using a VPN tunnel like https:/tunnelsats.com
  • configure your node with a hybrid mode for dynamic DNS
Many solutions in this guide https://github.com/TrezorHannes/vps-lnbits
reply
configure your node with a hybrid mode for dynamic DNS
You mean such that I have inbound connections on tor? That will not help with inbound connections on clearnet, right?
https://tunnelsats.com and https://github.com/TrezorHannes/vps-lnbits seem to be about running lightning routing nodes. Useful for later, but for now, it seems overkill for my use case.
But I guess the solution is just to use a SOCKS proxy with a VPS. Some kind of ssh -D should do the job. I am googling about it rn.
I think that's essentially what these services are also doing, just with more features, reliability etc. (since its for LN).
reply
No. Pay attention to that guide. There are explanations and links about how to configure your node using a dynamic dns. I didn't sent you those guides for nothing. I know what I am talking.
reply
This is the startup log. There is no warning that bitcoind can't resolve my external ip. There was before but no more:
2022-12-13T21:28:42Z Bitcoin Core version v24.0.0 (release build) 2022-12-13T21:28:42Z Using the 'sse4(1way),sse41(4way)' SHA256 implementation 2022-12-13T21:28:42Z Using RdRand as an additional entropy source 2022-12-13T21:28:42Z Default data directory /home/bitcoin/.bitcoin 2022-12-13T21:28:42Z Using data directory /home/bitcoin/.bitcoin 2022-12-13T21:28:42Z Config file: /etc/bitcoin/bitcoin.conf 2022-12-13T21:28:42Z Config file arg: datadir="/home/bitcoin/.bitcoin" 2022-12-13T21:28:42Z Config file arg: disablewallet="1" 2022-12-13T21:28:42Z Config file arg: discover="0" 2022-12-13T21:28:42Z Config file arg: externalip="***.duckdns.org" 2022-12-13T21:28:42Z Config file arg: i2pacceptincoming="true" 2022-12-13T21:28:42Z Config file arg: i2psam="127.0.0.1:7656" 2022-12-13T21:28:42Z Config file arg: listen="1" 2022-12-13T21:28:42Z Config file arg: mempoolfullrbf="1" 2022-12-13T21:28:42Z Config file arg: prune="0" 2022-12-13T21:28:42Z Config file arg: rpcpassword=**** 2022-12-13T21:28:42Z Config file arg: rpcuser=**** 2022-12-13T21:28:42Z Config file arg: server="1" 2022-12-13T21:28:42Z Config file arg: txindex="1" 2022-12-13T21:28:42Z Config file arg: upnp="1" 2022-12-13T21:28:42Z Config file arg: [main] rpcport="8332" 2022-12-13T21:28:42Z Config file arg: [test] rpcport="18332" 2022-12-13T21:28:42Z Command-line arg: conf="/etc/bitcoin/bitcoin.conf" 2022-12-13T21:28:42Z Command-line arg: daemonwait="" 2022-12-13T21:28:42Z Command-line arg: pid="/run/bitcoind/bitcoind.pid" 2022-12-13T21:28:42Z Using at most 125 automatic connections (1024 file descriptors available) 2022-12-13T21:28:42Z Using 16 MiB out of 16 MiB requested for signature cache, able to store 524288 elements 2022-12-13T21:28:42Z Using 16 MiB out of 16 MiB requested for script execution cache, able to store 524288 elements 2022-12-13T21:28:42Z Script verification uses 1 additional threads 2022-12-13T21:28:42Z Wallet disabled! 2022-12-13T21:28:42Z scheduler thread start 2022-12-13T21:28:42Z [http] creating work queue of depth 16 2022-12-13T21:28:42Z Config options rpcuser and rpcpassword will soon be deprecated. Locally-run instances may remove rpcuser to use cookie-based auth, or may be replaced with rpcauth. Please see share/rpcauth for rpcauth auth generation. 2022-12-13T21:28:42Z [http] starting 4 worker threads 2022-12-13T21:28:42Z Using /16 prefix for IP bucketing 2022-12-13T21:28:42Z init message: Loading P2P addresses… 2022-12-13T21:28:43Z Loaded 66072 addresses from peers.dat 277ms 2022-12-13T21:28:43Z init message: Loading banlist… 2022-12-13T21:28:43Z SetNetworkActive: true 2022-12-13T21:28:43Z AddLocal([***]:8333,4) 2022-12-13T21:28:43Z Cache configuration: 2022-12-13T21:28:43Z * Using 2.0 MiB for block index database 2022-12-13T21:28:43Z * Using 56.0 MiB for transaction index database 2022-12-13T21:28:43Z * Using 8.0 MiB for chain state database 2022-12-13T21:28:43Z * Using 384.0 MiB for in-memory UTXO set (plus up to 286.1 MiB of unused mempool space) 2022-12-13T21:28:43Z init message: Loading block index… 2022-12-13T21:28:43Z Assuming ancestors of block 00000000000000000009c97098b5295f7e5f183ac811fb5d1534040adb93cabd have valid signatures. 2022-12-13T21:28:43Z Setting nMinimumChainWork=00000000000000000000000000000000000000003404ba0801921119f903495e 2022-12-13T21:28:43Z Switching active chainstate to Chainstate [ibd] @ height -1 (null) 2022-12-13T21:28:43Z Opening LevelDB in /home/bitcoin/.bitcoin/blocks/index 2022-12-13T21:28:43Z Opened LevelDB successfully 2022-12-13T21:28:43Z Using obfuscation key for /home/bitcoin/.bitcoin/blocks/index: 0000000000000000 2022-12-13T21:28:47Z LoadBlockIndexDB: last block file = 3314 2022-12-13T21:28:47Z LoadBlockIndexDB: last block file info: CBlockFileInfo(blocks=58, size=76275525, heights=767218...767275, time=2022-12-13...2022-12-13) 2022-12-13T21:28:47Z Checking all blk files are present... 2022-12-13T21:28:48Z Opening LevelDB in /home/bitcoin/.bitcoin/chainstate 2022-12-13T21:28:48Z Opened LevelDB successfully 2022-12-13T21:28:48Z Using obfuscation key for /home/bitcoin/.bitcoin/chainstate: eb9259dde26d4077 2022-12-13T21:28:49Z Loaded best chain: hashBestChain=000000000000000000044208f390d8c0c8a3d522cc95710025e88dcb7a9801cf height=767275 date=2022-12-13T21:26:27Z progress=0.999999 2022-12-13T21:28:49Z init message: Verifying blocks… 2022-12-13T21:28:49Z Verifying last 6 blocks at level 3 2022-12-13T21:28:49Z [0%]...[16%]...[33%]...[50%]...[66%]...[83%]...[99%]...[DONE]. 2022-12-13T21:28:54Z No coin database inconsistencies in last 6 blocks (10590 transactions) 2022-12-13T21:28:54Z block index 11417ms 2022-12-13T21:28:54Z Opening LevelDB in /home/bitcoin/.bitcoin/indexes/txindex 2022-12-13T21:28:55Z Opened LevelDB successfully 2022-12-13T21:28:55Z Using obfuscation key for /home/bitcoin/.bitcoin/indexes/txindex: 0000000000000000 2022-12-13T21:28:55Z Setting NODE_NETWORK on non-prune mode 2022-12-13T21:28:55Z block tree size = 767305 2022-12-13T21:28:55Z nBestHeight = 767275 2022-12-13T21:28:55Z loadblk thread start 2022-12-13T21:28:55Z txindex thread start 2022-12-13T21:28:55Z txindex is enabled at height 767275 2022-12-13T21:28:55Z txindex thread exit 2022-12-13T21:28:55Z mapport thread start 2022-12-13T21:28:55Z Leaving InitialBlockDownload (latching to false) 2022-12-13T21:28:55Z Bound to 127.0.0.1:8334 2022-12-13T21:28:55Z Bound to [::]:8333 2022-12-13T21:28:55Z Bound to 0.0.0.0:8333 2022-12-13T21:28:55Z Loaded 2 addresses from "anchors.dat" 2022-12-13T21:28:55Z 2 block-relay-only anchors will be tried for connections. 2022-12-13T21:28:55Z init message: Starting network threads… 2022-12-13T21:28:55Z msghand thread start 2022-12-13T21:28:55Z opencon thread start 2022-12-13T21:28:55Z torcontrol thread start 2022-12-13T21:28:55Z dnsseed thread start 2022-12-13T21:28:55Z Waiting 300 seconds before querying DNS seeds. 2022-12-13T21:28:55Z net thread start 2022-12-13T21:28:55Z addcon thread start 2022-12-13T21:28:55Z init message: Done loading 2022-12-13T21:28:55Z Imported mempool transactions from disk: 555 succeeded, 0 failed, 0 expired, 0 already there, 0 waiting for initial broadcast 2022-12-13T21:28:55Z loadblk thread exit 2022-12-13T21:28:56Z New outbound peer connected: version: 70016, blocks=767276, peer=0 (block-relay-only) 2022-12-13T21:28:57Z New outbound peer connected: version: 70015, blocks=767275, peer=1 (block-relay-only)
reply
That is the nature of IP networking. When your public IP changes that means all established incoming connections using the old IP gets terminated.
If everything is running correctly with your dynamic DNS, your bitcoin node will start advertising the new IP and after a while you will get new incoming connections.
reply
Get a domain from cloudflare, create a cloudflare tunnel, use “externalhosts=yourdomain.com”
reply
This seems to be a LND config option. I am using externalip which should do the same thing for bitcoind but it's not working as expected.
reply
Maybe its because you're using the url and not the IP? Idk
reply
Not sure how to solve your problem. But the good news is that you probably don't need to solve it.
Between your node and mine, we'll probably both be online between the two of us. Oh and the other tens of thousands of nodes.
Or did I overlook something?
reply
No, you didn't.
But I want to have the full bitcoin full node experience with helping to bootstrap other nodes during their initial block download. Also, I consider it interesting to see which nodes connect to me etc.
reply