monero icon indicating copy to clipboard operation
monero copied to clipboard

reverse proxy for rpc?

Open Roki100 opened this issue 2 years ago • 4 comments

Hello! I started my node few days ago and i am using nginx for my node now to connect to rpc with wallets, but i have noticed that monerod is not aware of this at all and when i enable log level to 1 each http request is actually an ip of nginx's docker container, is there a way to get monerod to be "aware" of the reverse proxy and recognize real ips via some real ip header? like --reverse-proxy or something?

Roki100 avatar May 29 '22 02:05 Roki100

Do you have monerod running in a docker container? if so you can force the docker container to have a static ip see here note: this is considered bad practice, but it works for me. and then in nginx something like:

  location /something {
    proxy_pass http://172.20.111.2:8000;
  }

plowsof avatar May 31 '22 23:05 plowsof

Do you have monerod running in a docker container? if so you can force the docker container to have a static ip see here note: this is considered bad practice, but it works for me. and then in nginx something like:

  location /something {
    proxy_pass http://172.20.111.2:8000;
  }

yes it is running in docker container and i have already set up networking properly, proxy_pass https://monerod:18089; but that is not what i asked though, monerod is not aware of being behind a proxy and it doesnt recognize real request ips, so i guess its a bad thing for any sort of anti abuse mechanisms

Roki100 avatar Jun 01 '22 08:06 Roki100

sounds like a docker container / networking issue rather than monerod problem? It reminds me of running a tor hidden service* where all ip's are 'localhost', is there a specific issue that this causes? or are you worried about something potentially happening?

plowsof avatar Jun 01 '22 22:06 plowsof

sounds like a docker container / networking issue rather than monerod problem? It reminds me of running a tor hidden service* where all ip's are 'localhost', is there a specific issue that this causes? or are you worried about something potentially happening?

no its not docker issue, monerod simply does not respect any real ip/forwarded for header

Roki100 avatar Jun 02 '22 05:06 Roki100