RunOnFlux/flux

uPnP changes for restrictive routers

Closed this issue · 4 comments

w2vy commented

Some routers are more restrictive than others and will not honor a Lease time of 0 seconds being infinate.

In one instance it defaulted to 7 days (604800 sec)
Oddly enough the lease time could be set to 13+ years (409999999). While changing the 0 to 10 years might fix it for some routers, it may not fix the majority.

Possible solution:

  1. set the duration to 48 hrs and refresh the port every 24 hrs, monitor app ports too which will be added and removed as needed, but could stay put for long periods
  2. We need to be pro-active in restoring lost ports because some routers do not maintain uPnP port forwards across reboot. Maybe check the port forwards hourly to restore any that are lost

One other thing that might be nice, when adding the port use the description to define what it is used for for 161xx "rpi port" "fluxport" etc and app ports could get the app name

w2vy commented

@TheTrunk
I know this is closed, but I just noticed that the calls to removeMapUpnpPort pass in Port and a String (App name) but the defined function only has a single argument, the Port.

Thank you, will go through it and fix asap

w2vy commented

I am going through the upnp library to see why the descriptions are not being applied
Library look fine, strange(edit)
cockpit error - did not pull the flux changes to the node

w2vy commented

I think this can be closed