3

I'm trying to connect to my own remote node by running

./monero-wallet-cli --daemon-address <my ip>:18081

but this command fails: Daemon either is not started or wrong port was passed
The daemon is up and running. If I try to run the cli from the same machine as the daemon, using localhost:18081 then everything works. And if I try to run the cli from the same machine using <my ip>:18081, it fails again. I'm getting my IP by googling my ip.
What am I doing wrong? Should I run the daemon with special flags (right now I'm not using any)?

Edit:
I saw another question suggesting to run a node for remote connections with

./monerod --rpc-bind-ip <external.ip.of.node> --restricted-rpc --confirm-external-bind

But this command results in a failure on the node itself:

Exception in main! Failed to initialize core rpc server.  

2nd Edit:
As the accepted answer suggested, I had to forward port 18081 to the machine running the daemon (from the router settings). I also had to --rpc-bind-ip to my local ip, not the external.

5
  • Are you trying to connect from inside the node's LAN or from out on the internet? Sep 25, 2017 at 14:04
  • outside of the node's LAN
    – Jona
    Sep 26, 2017 at 5:30
  • Binding to the external IP of the node is badly worded. You bind on the assigned IP of a network interface. That's the external IP in your network. That is not the external IP on the internet (unless your computer is connected to the internet directly, but unless you're an ISP or backbone company it's unlikely).
    – user36303
    Sep 26, 2017 at 11:26
  • @user36303 I don't quite follow. What IP should I bind it to?
    – Jona
    Sep 26, 2017 at 12:19
  • To the one assigned to the network interface through which I will receive data from the internet. Typically, it's assigned by DHCP. You can also bind to 0.0.0.0, wihch is shorthand for "any".
    – user36303
    Sep 26, 2017 at 13:57

1 Answer 1

2

This is a common issue on first configuration. You need to open any firewall on port 18081, and/or forward this port on your router. Otherwise, the connection attempt is rejected.

If you open your RPC to the external world, you may want to also use --restricted-rpc, which disables some RPC which could give the client too much information.

2
  • Could you elaborate on opening port/forwarding port?
    – Jona
    Sep 26, 2017 at 5:36
  • Not really. It depends on your router/firewall.
    – user36303
    Sep 26, 2017 at 9:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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