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.

Jona
  • 852
  • 5
  • 17

1 Answers1

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.

user36303
  • 34,928
  • 2
  • 58
  • 123