Author

Topic: Does RPC support "call over internet" ? (Read 176 times)

copper member
Activity: 1652
Merit: 1901
Amazon Prime Member #7
March 01, 2020, 01:34:58 PM
#6
If I am not mistaken, even if ill-advisable, you can add the rpcallowip=[IPv4/IPv6 address or with a subnet specification] line to bitcoin.conf to accept connections from external IP addresses.

Alternatively you can use reverse proxy, which also could take care security problem (assuming you configure it properly).
Yes, a reverse proxy, assuming the proxy is configured to only make specific RPC commands would be better security-wise than allowing RPC access via the internet. I believe the OPs question is if it is possible to have RPC access via the internet, and the answer is that this is a very bad idea, but it is possible.
The best solution would probably be to have an intermediary DB that stores whatever information you want to be publicly available on the internet and have an API that queries the DB (similar to what achow101 described above).
staff
Activity: 3458
Merit: 6793
Just writing some code
March 01, 2020, 01:26:37 PM
#5
There are many web-service/app which serves bitcoin. What is their tech prototype ?
As my understanding, they must enter bitcoin network by a node. How do they provide service on internet ? I guess they talk to some bitcoin core node by rest/RPC by IP address  and then expose their service by web interface.
They run Bitcoin Core as part of their backend. Their APIs and whatever else is part of their service accesses the RPCs as needed. The RPCs are never directly exposed to the internet.
jr. member
Activity: 47
Merit: 8
March 01, 2020, 03:48:58 AM
#4
No. RPC is not exposed over the internet and it is not safe to expose it to the internet.

Nodes communicate using the P2P protocol. There is no need for another node to directly control another node using the RPC commands.

There are many web-service/app which serves bitcoin. What is their tech prototype ?
As my understanding, they must enter bitcoin network by a node. How do they provide service on internet ? I guess they talk to some bitcoin core node by rest/RPC by IP address  and then expose their service by web interface.

do you know some project that i could refer its code ?
actually this question bothers me a lot for a long time...

Thanks 
copper member
Activity: 1652
Merit: 1901
Amazon Prime Member #7
March 01, 2020, 02:37:33 AM
#3
If I am not mistaken, even if ill-advisable, you can add the rpcallowip=[IPv4/IPv6 address or with a subnet specification] line to bitcoin.conf to accept connections from external IP addresses.
staff
Activity: 3458
Merit: 6793
Just writing some code
February 29, 2020, 09:06:09 PM
#2
No. RPC is not exposed over the internet and it is not safe to expose it to the internet.

Nodes communicate using the P2P protocol. There is no need for another node to directly control another node using the RPC commands.
jr. member
Activity: 47
Merit: 8
February 29, 2020, 08:51:26 PM
#1
Currently bitcoin core support Rest and RPC. while REST support less apis.
RPC support invoke apis across-process .
So it aslo support call api "over internet" ?

Node_B call Node_A's api by A's ipaddress,Right ? Because RPC is implemented based on PORT communication.

Thanks


Jump to: