2

If wallets use the API port and therefore access to certain functions needs to be restricted, how can a script of mine use the full API without those restrictions?

For example https://iotasupport.com/startup-flags_fr.shtml claims that

It is essential to disable some API calls (to close attack vectors and prevent misuse): getNeighbors, removeNeighbors, addNeighbors, attachTotangle, interruptAttachingToTangle.

So how can then a script of mine connect to it to use those methods, for example to add or remove neighbors.

  • So, I'm new to it. My understanding is that wallets connect to the API port, hence many commands should be removed. Like addNeighbor and so. How can I then use that API to add a neighbor via a script? I don't intend to connect to remote hosts. Is localhost excluded from that filter? – Daniel F Dec 23 '17 at 19:45
  • My apologies, I've updated the question – Daniel F Dec 23 '17 at 20:06
3

When you limit the allowed API calls with remote-limit-api option, this will only be valid when the caller is remote (i. e. not on the loopback interface). So if you run scripts on your own host, they can do everything.

In case you need to run "limited" commands from another host, you'd probably have to put some kind of reverse proxy (e. g. Apache httpd) in front of your API port and use its access control to do more granular access restrictions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.