json-rpc api works locally but getting "Connection Refused" remotely
Make sure to set

rpcallowip=&lt;ip&gt;


for each of your remote IPs, to whitelist them.

You can also use a netmask instead of IP. If you have a dynamic IP, use this feature!

For example, if your laptop's IP always starts with 237.94, you can set it to

rpcallowip=237.94.0.0/255.255.0.0


Then it'll allow all IPs that start with those numbers. Make sure to set a really strong password, though.