monerodocs / md

Unofficial technical documentation for Monero cryptocurrency
https://monerodocs.org
MIT License
83 stars 61 forks source link

Bind to loopback network interface instead of all interfaces #45

Closed dimeola closed 2 years ago

dimeola commented 2 years ago

I'm using this variation of your doc, using loopback network interface. BTW I also include for convenience, both a config file and a systemd unit file.

qertoip commented 2 years ago

Thanks for your contribution!

However, I don't really understand the goal here. The intention of this tutorial is to configure a public and open node, hence we want to bind to the public network interface as well.

Am I missing something?

dimeola commented 2 years ago

Sorry, I thought that the node was accessible via the tor hidden service, no directly via the network interfaces. Surely I'm missing how the real input flow it's working via tor.

qertoip commented 2 years ago

It's supposed to be available both over clearnet and Tor. The Tor part indeed relies on listening on the localhost, hence listening on all interfaces in original config.

dimeola commented 2 years ago

Sorry but, in my hidden service config, I'm redirecting ports as follows;

18083,127.0.0.1:18083

which I suppose to redirect from 18083 hidden service port to 18083 in the loopback network interface not to all interfaces (0.0.0.0).

Still I feel I'm missing some point. :-(

qertoip commented 2 years ago

Tor ports are virtual. They are separate from normal ports. Yes, you redirect Tor-18083 to normal-localhost-18083. This is fine.

On top of that and independently you can also have monerod listening on normal-public-18083 for clearnet connections.

The key insight here is that Tor ports defined in your torrc are virtual ports within Tor only and do not clash with normal ports.