Here is an article on the question you are facing accommodation of the Bitcoin Core Json-RPC:
Ethereum: RPC Json outside the problem of configuration of the core core core
During the performance of the bitcoin core (BTC) as a server, it is not unusual to encounter problems with access to the endpoint JSON-RPC outside the local machine. In this article, we will examine why you could encounter this problem and provide solutions.
Why is it going?
The problem is how the Bitcoin core controls the RPC connection. In default, Localhost listens: 8333(or 127.0.0.1: 8333 'for IPV4). However, when you try to access the Json-RPC end point outside this local connection, the bitcoin core is trying to connect to
IP_ADDRESS: 83333, where 'IP_ADDRESS' is a random IP address that the system credits.
bitcoin.conf configuration
Your Bitcoin.conf file looks like this:
Ini
Testnet = 1
server = 1
Demon = 1
Listen = 1
`'
Please note that there is no option to enter an IP address or alternative port for JSON-RPC connections. This is the default parameter and only applies to RPC connections.
Why is it not working?
When you try to access the end of the Json-RPC exit outside "Locehost", Bitcoin Core uses its internal IP address (or 0.0.0.0 in IPV4) as the target host and port number. In fact, default parameters do not explicitly allow hosts or alternative ports.
solutions:
You have several options to overcome this problem:
- Use
ip_address: 8333 ‘instead of“ 8333 ”:
You can change your Bitcoin.conf file to use an IP alternative address as shown at the JSon-RPC end point:
Ini
Testnet = 1
server = 1
Demon = 1
Listen = 0.0.0.0
Listen to all available network interfaces
RPIPI = "192.168.1.100"
Enter another IP address
Rpcport = 8333
Enter the port number
The rest of your configuration ...
'
In this example, we use0.0.0.0to listen to all available network interfaces, then by entering an alternative IP address (
192.168.1.100) to connect RPC.
- Use a DNS -based configuration:
Alternatively, you can configure a bitcoin core to use DNS -based access that allows you to solve your device at its actual IP address:
Ini
Testnet = 1
server = 1
Demon = 1
Listen = 0.0.0.0
DNS -adDr = “Example.com”
`'
In this case, you must make sure that the DNS in exemtame.com 'is solved correctly.
- Use another JSON-RPC port:
If you do not worry about listening to RPC connections and want to use a specific port number for the JSON-RPC end point (for example, 8545), you can enter it in Bitcoin.conf:
Ini
Testnet = 1
server = 1
Demon = 1
Listen = 0.0.0.0
RPIPI = “192.168.1.100”
Rpcport = 8545
“ ‘
Keep in mind that this will require changes to the JSon-RPC end point configuration, which may not be necessary if you use another port number.
Conclusion:
If you want to overcome the problem of accessing the RPC Ethereum points outside the local bitcoin core, consider one or more of the above solutions. By editing Bitcoin.conf or examining other approaches, you should be able to solve this problem and continue to perform the JSon-RPC server.