Bitcoin Forum
May 11, 2024, 08:17:11 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Does RPC support "call over internet" ?  (Read 163 times)
maplelake (OP)
Jr. Member
*
Offline Offline

Activity: 47
Merit: 8


View Profile
March 01, 2020, 01:51:26 AM
 #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


1715415431
Hero Member
*
Offline Offline

Posts: 1715415431

View Profile Personal Message (Offline)

Ignore
1715415431
Reply with quote  #2

1715415431
Report to moderator
"Bitcoin: the cutting edge of begging technology." -- Giraffe.BTC
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715415431
Hero Member
*
Offline Offline

Posts: 1715415431

View Profile Personal Message (Offline)

Ignore
1715415431
Reply with quote  #2

1715415431
Report to moderator
1715415431
Hero Member
*
Offline Offline

Posts: 1715415431

View Profile Personal Message (Offline)

Ignore
1715415431
Reply with quote  #2

1715415431
Report to moderator
1715415431
Hero Member
*
Offline Offline

Posts: 1715415431

View Profile Personal Message (Offline)

Ignore
1715415431
Reply with quote  #2

1715415431
Report to moderator
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3388
Merit: 6635


Just writing some code


View Profile WWW
March 01, 2020, 02:06:09 AM
Merited by ABCbits (1)
 #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.

PrimeNumber7
Copper Member
Legendary
*
Offline Offline

Activity: 1624
Merit: 1899

Amazon Prime Member #7


View Profile
March 01, 2020, 07: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.
maplelake (OP)
Jr. Member
*
Offline Offline

Activity: 47
Merit: 8


View Profile
March 01, 2020, 08: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 
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3388
Merit: 6635


Just writing some code


View Profile WWW
March 01, 2020, 06: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.

PrimeNumber7
Copper Member
Legendary
*
Offline Offline

Activity: 1624
Merit: 1899

Amazon Prime Member #7


View Profile
March 01, 2020, 06: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).
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!