Bitcoin Stack Exchange is a question and answer site for Bitcoin crypto-currency enthusiasts. It only takes a minute to sign up.
Sign up to join this communityAnybody can ask a question
Anybody can answer
The best answers are voted up and rise to the top
I tried every different combination in bitcoin.conf to make my bitcoin node (hosted in AWS protected behind VPN) reachable but nothing seems to work...
Just to clear it out of the way, I opened the port 8332 on the machine.
Here is my bitcoin.conf:
txindex=1 server=1 rest=1 # Auth Credentials For JSON-RPC server rpcuser=your_username rpcpassword=your_password #chain=test testnet=1 #rpcallowip=0.0.0.0/0 [test] rest=1 rpcallowip=0.0.0.0/0 rpcallowip=::/0 rpcbind=0.0.0.0:8332 # Listen for JSON-RPC connections on this port #rpcport=8332
Here is the netstat:
ubuntu@blahblah:~$ sudo ss -ltpn State Recv-Q Send-Q Local Address:Port Peer Address:Port LISTEN 0 128 0.0.0.0:18333 0.0.0.0:* users:(("bitcoind",pid=14485,fd=29)) LISTEN 0 128 0.0.0.0:8332 0.0.0.0:* users:(("bitcoind",pid=14485,fd=9)) LISTEN 0 128 127.0.0.53%lo:53 0.0.0.0:* users:(("systemd-resolve",pid=644,fd=13)) LISTEN 0 128 0.0.0.0:22 0.0.0.0:* users:(("sshd",pid=760,fd=3)) LISTEN 0 128 [::]:18333 [::]:* users:(("bitcoind",pid=14485,fd=28)) LISTEN 0 128 [::]:22 [::]:* users:(("sshd",pid=760,fd=4))
I cant reach my node with the following RPC call: (locally I can)
curl --data-binary '{"jsonrpc":"1.0","id":"curltext","method":"getblockchaininfo","params":[]}' -H 'content-type:text/plain;' http://your_username:your_password@my_machine_ip:8332
I get timeout:
curl: (28) Failed to connect to my_machine_ip port 8332: Connection timed out
But when I run:
docker run --name mynginx1 -p 8332:80 -d nginx
I can curl to 8332 from my own computer and get a response.
my netstat with the docker running:
ubuntu@blahblah:~$ sudo ss -ltpn State Recv-Q Send-Q Local Address:Port Peer Address:Port LISTEN 0 4096 0.0.0.0:8332 0.0.0.0:* users:(("docker-proxy",pid=13131,fd=4)) LISTEN 0 128 127.0.0.53%lo:53 0.0.0.0:* users:(("systemd-resolve",pid=644,fd=13)) LISTEN 0 128 0.0.0.0:22 0.0.0.0:* users:(("sshd",pid=760,fd=3)) LISTEN 0 4096 [::]:8332 [::]:* users:(("docker-proxy",pid=13139,fd=4)) LISTEN 0 128 [::]:22 [::]:* users:(("sshd",pid=760,fd=4))
What's lead me to the conclusion that my problem is that I dont have IPv6 rpc bind with the bitcoin node.
I went to the manual and read the following:
-rpcbind=[:port] Bind to given address to listen for JSON-RPC connections. Do not expose the RPC server to untrusted networks such as the public internet! This option is ignored unless -rpcallowip is also passed. Port is optional and overrides -rpcport. Use [host]:port notation for IPv6. This option can be specified multiple times (default: 127.0.0.1 and ::1 i.e., localhost)
But every way I tried to specify the IPv6 in the rpcbind is not helping.
At least for IPv4, you can't specify 0.0.0.0
for rpcbind
. You'll get this error in bitcoind logs if you try:
Binding RPC on address 0.0.0.0 port 18443 failed.
Try 127.0.0.1
for IPv4, or ::1/128
for IPv6.
bitcoind -rpcbind=127.0.0.1
You can get bonuses upto $100 FREE BONUS when you:
π° Install these recommended apps:
π² SocialGood - 100% Crypto Back on Everyday Shopping
π² xPortal - The DeFi For The Next Billion
π² CryptoTab Browser - Lightweight, fast, and ready to mine!
π° Register on these recommended exchanges:
π‘ Binanceπ‘ Bitfinexπ‘ Bitmartπ‘ Bittrexπ‘ Bitget
π‘ CoinExπ‘ Crypto.comπ‘ Gate.ioπ‘ Huobiπ‘ Kucoin.
Comments