Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] rpcallowip (static ip does not work) #2688

Open
konlag opened this issue Dec 15, 2021 · 5 comments
Open

[Bug] rpcallowip (static ip does not work) #2688

konlag opened this issue Dec 15, 2021 · 5 comments

Comments

@konlag
Copy link

konlag commented Dec 15, 2021

I use pivx v5.3.3
rpcallowip=127.0.0.1 - working
other static ip does not work
example:
rpcallowip=94.156.11.7 - does not work
Works only from localhost successfully. I am using curl.

@furszy
Copy link

furszy commented Dec 15, 2021

Hello,
Before anything else, would recommend you to not expose the JSON-RPC server to untrusted networks such as the public internet.

There are other solutions for this like: https://github.com/random-zebra/PIVX-NGINX_proxy . Where you can expose only certain commands, limit the access, connect through a TLS channel, among other nice features.

Saying that, if you still want to take the risk and expose your node's JSON-RPC server, you have to combine rpcbind, rpcallowip and server arguments in the pivx.conf and open the rpcport in your machine.

@konlag
Copy link
Author

konlag commented Dec 16, 2021

none of this works.
only local ip works (localhost)
check yourself..

@krunalmangroliya
Copy link

add below 4 lines
rpcallowip= remote server ip
rpcallowip= node hosted IP
rpcbind= nodfe hosted ip
rpcbind= 127.0.0.1

@skironDotNet
Copy link

To use rpcallowip you need same IP you are connecting from, you need rpcbind to be your server or home machine IP, if you don't want to use default port you must set rpcport.
Whichever port you use must open firewall to allow to connect to it.

Here is a demo, connecting from home to hosted on VPS (masked home IP)

image

image

image

Please close the issue, not a bug

@skironDotNet
Copy link

@furszy I always wanted to write API wrapper to expose RPC over SSL, this PIVX Nginx Proxy is such a great idea. I'll look into that, Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants