Forbidden Message

+1 vote

I have multichain running on 2 nodes on AWS and everything works perfectly fine.  I've created a simple API (written in nodeJS) that returns 'getinfo' data. I'm using postman to make the request and it transmits fine when I'm at home however, when I connect my laptop to an external wifi I.e. coffee shop, mobile hotspot... I keep getting a 'Forbidden' error message.

I don't have the rcpallowip defined in the multichain.conf file but I did try adding it while I was at a coffee shop working remotely, still get the error message.  Here is the function I'm running that returns the getinfo data:

exports.getInfo = async (req, res, next) => {
    multichain.getInfo((err, info) => {

        if(err){
          throw err;
        }

        res.json(info);
    });
}

Has anyone else experienced or know the answer to this?

asked Jul 8 by anonymous

1 Answer

0 votes

You need to set this in multichain.conf:

rpcallowip=0.0.0.0/0

And then stop and restart the node.

Note that this is not recommend for production!

answered Jul 9 by MultiChain
Ahh yes that was the issue, I should have restarted the node. Thank you and I'll make a note of updating the IP, if we get this to production.
...