Open pablomendezroyo opened 2 years ago
Is this why I can't log in to my DAppNode if I switch the ethernet cable to my 2nd router and 2nd ISP? I had to reboot my node when this happened, because I waited and waited and it never resumed validating.
I thought maybe the VPN didn't realize I was on a new public IP, and couldn't reach me.
But it makes sense if the DAppNode doesn't recognize that it's been assigned a new local IP address, and therefore doesn't update it's UPnP ports.
@JHGrove3 I would have to double-check the code but yes, I would say that changing the dappnode local IP may result in some connectivity methods (specially for VPN: wireguard and OpenVPN) to stop working until this local IP is refreshed and the UPnP port mapping is done once again
Local IP of dappnode may change depending on the router settings and external agents that do not depend on dappnode.
When this local IP changes the UPnP port mapping should be executed once again, especially for VPN clients to work back again.
Local IP should be memoized on dappmanager startup and checked on a loop, if it changes then do the port forwarding again on the router with UPnP. If UPnP is not available alert the user somehow
Also consider having a
dappnode
command to do a UPnP port mapping for VPN clients ports (5180 and 8092) directly from the CLI