firoorg / firo

The privacy-focused cryptocurrency
https://firo.org
MIT License
717 stars 357 forks source link

Znode In LAN: Can I use `bind` in zcoin.conf ? #580

Closed gaia closed 5 years ago

gaia commented 5 years ago
znode=1
externalip=X.X.X.X:8168

I am getting Not capable znode: Could not connect to X.X.X.X:8168. The port forward is fine, as tested externally using telnet.

But telnet from inside the VPS itself only works with 10.10.10.102:8168 (the LAN address of the node). Telnet to X.X.X.X:8168 from within the node does not work.

Is it possible to add bind=10.10.10.102:8168 to zcoin.conf to have the node try to connect to itself via LAN instead of via the external IP? I'd rather not use NAT Reflection if possible.

PS: I tried and it did not work. NAT reflection seems to be required. Could someone pls confirm?

catchingknives commented 5 years ago

I'm not familiar with NAT reflection in particular but haven't seen Znodes work in NAT settings. The IP address specified in externalip needs to be directly configured on one of its interfaces. If NAT reflection indeed works, that'd be interesting to know though!

gaia commented 5 years ago

It works on pfSense, you can use either NAT + Proxy or Pure NAT (the last one provided that you enable automatic outbound NAT for Reflection)

https://docs.netgate.com/pfsense/en/latest/book/nat/nat-reflection.html

Previously I had a box with a NAT IP behind a router, and simply port forwarding from the router worked. It did not require NAT Reflection, but then firewall was UFW inside the box, now the firewall is external (pfsense)

under any condition, externalip must be a public IP. hence the question whether bind is allowed, because it works in other chains, without requiring NAT Reflection, even behind an external firewall.