I am having problems exposing my RSK node to an external IP. My startup command looks as follows:
java \
-cp $HOME/Downloads/rskj-core-3.0.1-IRIS-all.jar \
-Drsk.conf.file=/root/bitcoind-lnd/rsk/rsk.conf \
-Drpc.providers.web.cors=* \
-Drpc.providers.web.ws.enabled=true \
co.rsk.Start \
--regtest
This is my rsk.conf
:
rpc {
providers {
web {
cors: "*",
http {
enabled = true
bind_address = "0.0.0.0"
hosts = ["localhost", "0.0.0.0"]
port: 4444
}
}
}
}
API is accessible from localhost, but from external network I get error 400. How do I expose it to external network?
Specify the internal port for your Node-RED server (default is 1880). Specify the external port you want to use to access your Node-RED server. I used 443 since the site is encrypted and HTTPS will default to 443 by default. Select TCP and UDP (I’m not really sure if UDP is used but figured why not).
In order to access the service from the external network, the users can use <IP>:<NodePort> where <IP> is the IP address on the external network of any of the nodes. This method is easy to implement.
In this guide, we're going to review three services to expose your local Node.js app to the world: When a remote service needs to call your application and you don't want (or can) deploy your application to a public server. For debugging purposes, it's better to keep everything local.
Click on the “…” menu in the upper right and select the Set up IPv4 port forwarding option. Specify the internal port for your Node-RED server (default is 1880). Specify the external port you want to use to access your Node-RED server. I used 443 since the site is encrypted and HTTPS will default to 443 by default.
You should add your external IP to hosts
. Adding just 0.0.0.0
is not enough to indicate all IPs to be valid. Port forwarding needs to be enabled for the port number that you have configured in rsk.conf
, which in this case is the default value of 4444
.
rpc {
providers {
web {
cors: “*”,
http {
enabled = true
bind_address = “0.0.0.0"
hosts = [“localhost”, “0.0.0.0", “216.58.208.100”]
port: 4444
}
}
}
}
where 216.58.208.100
is your external IP
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With