View previous topic :: View next topic |
Author |
Message |
NickH
Joined: 10 Feb 2018 Posts: 26
|
Posted: Wed Sep 09, 2020 10:57 am Post subject: What causes port leases to expire? |
|
|
I have a port lease which would have last been used on Aug 25 or earlier when I changed the host's IP address but it still shows and I assume is stopping the new IP address from making the same port forwarding rule. How or when does miniupnpd expire leases?
For the moment I've had to manually remove the lease from /var/lib/miniupnpd/upnp.leases |
|
Back to top |
|
 |
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1594
|
Posted: Sun Sep 20, 2020 1:33 pm Post subject: |
|
|
port Leases have a duration, that could be infinite, so it will never expire.
you should not manually remove leases, just use a UPnP IGD client to do that. _________________ Main miniUPnP author.
https://miniupnp.tuxfamily.org/ |
|
Back to top |
|
 |
NickH
Joined: 10 Feb 2018 Posts: 26
|
Posted: Sun Sep 20, 2020 5:17 pm Post subject: |
|
|
I am afraid I don't fully understand the process. What sort of client are you talking about? Does it run on the same machine as miniupnpd or elsewhere? |
|
Back to top |
|
 |
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1594
|
Posted: Tue Sep 22, 2020 10:22 pm Post subject: |
|
|
NickH wrote: | I am afraid I don't fully understand the process. What sort of client are you talking about? Does it run on the same machine as miniupnpd or elsewhere? |
Usually elsewhere. MiniUPnPd is an UPnP Internet Gateway Device (aka IGD) implementation. In UPnP terminology, clients are called "control points" and are piece of software on other LAN hosts.
What are the control points you are using ? _________________ Main miniUPnP author.
https://miniupnp.tuxfamily.org/ |
|
Back to top |
|
 |
NickH
Joined: 10 Feb 2018 Posts: 26
|
Posted: Wed Sep 23, 2020 10:50 am Post subject: |
|
|
Thanks for the explanation. In this case the control point is a ClearOS7 server running in a VM. I am playing around with it as a Sia host and I assume the Sia daemon has the UPnP IGD client in it. |
|
Back to top |
|
 |
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1594
|
Posted: Wed Sep 23, 2020 9:30 pm Post subject: |
|
|
NickH wrote: | Thanks for the explanation. In this case the control point is a ClearOS7 server running in a VM. I am playing around with it as a Sia host and I assume the Sia daemon has the UPnP IGD client in it. |
If available, you can install miniupnpc on the ClearOS machine and use the upnpc command line tool _________________ Main miniUPnP author.
https://miniupnp.tuxfamily.org/ |
|
Back to top |
|
 |
stacy09 Guest
|
Posted: Fri Oct 30, 2020 6:27 am Post subject: |
|
|
thank you |
|
Back to top |
|
 |
NickH
Joined: 10 Feb 2018 Posts: 26
|
Posted: Fri Aug 13, 2021 10:52 am Post subject: |
|
|
I'm bumping this old topic as I still don't fully understand.
My set up is ClearOS7 gateway running miniupnpd and on the network behind it are various devices such as a PS4 and another bunch of ClearOS7 servers, one of which runs Sia (which uses uPnP).
If the PS4 is turned off, what causes its leases with miniupnpd to expire? Ditto the ClearOS servers running Sia? |
|
Back to top |
|
 |
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1594
|
Posted: Wed Aug 18, 2021 8:54 am Post subject: |
|
|
Please use miniupnpc (or another client) on any host on your network to display which leases are active.
Code: |
$ upnpc -l
upnpc : miniupnpc library test client, version 2.2.0.
(c) 2005-2020 Thomas Bernard.
Go to http://miniupnp.free.fr/ or https://miniupnp.tuxfamily.org/
for more information.
List of UPNP devices found on the network :
desc: http://192.168.11.254:5678/desc/root
st: urn:schemas-upnp-org:device:InternetGatewayDevice:1
Found valid IGD : http://192.168.11.254:5678/control/wan_ip_connection
Local LAN ip address : 192.168.11.150
Connection Type : IP_Routed
Status : Connected, uptime=5411256s, LastConnectionError : ERROR_NONE
Time started : Wed Jun 16 19:44:48 2021
MaxBitRateDown : 25000000 bps (25.0 Mbps) MaxBitRateUp 1000000 bps (1.0 Mbps)
ExternalIPAddress = <xxxx>
i protocol exPort->inAddr:inPort description remoteHost leaseTime
0 TCP 51413->192.168.11.150:51413 'Transmission at 51413' '' 603760
1 UDP 51413->192.168.11.150:51413 'Transmission at 51413' '' 603760
GetGenericPortMappingEntry() returned 713 (SpecifiedArrayIndexInvalid)
|
_________________ Main miniUPnP author.
https://miniupnp.tuxfamily.org/ |
|
Back to top |
|
 |
NickH
Joined: 10 Feb 2018 Posts: 26
|
Posted: Wed Aug 18, 2021 10:49 am Post subject: |
|
|
I've tried miniupnpc 2.2.2 but it won't run: Code: | [root@microserver miniupnpc-2.2.2]# upnpc -l
upnpc: error while loading shared libraries: libminiupnpc.so.17: cannot open shared object file: No such file or directory
| But: Code: | [root@microserver miniupnpc-2.2.2]# updatedb && locate libminiupnpc
/usr/lib/libminiupnpc.a
/usr/lib/libminiupnpc.so
/usr/lib/libminiupnpc.so.17
/usr/src/miniupnpc-2.2.2/libminiupnpc.a
/usr/src/miniupnpc-2.2.2/libminiupnpc.so |
So I have tried the old precompiled Windows client:
Code: | C:\Users\Nick\Downloads\upnpc-exe-win32-20150918>upnpc-shared.exe -l
upnpc : miniupnpc library test client, version 1.9.
(c) 2005-2014 Thomas Bernard.
Go to http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
for more information.
List of UPNP devices found on the network :
desc: http://172.17.2.1:41068/rootDesc.xml
st: urn:schemas-upnp-org:device:InternetGatewayDevice:1
Found valid IGD : http://172.17.2.1:41068/ctl/IPConn
Local LAN ip address : 172.17.2.118
Connection Type : IP_Routed
Status : Connected, uptime=511662s, LastConnectionError : ERROR_NONE
Time started : Thu Aug 12 13:35:50 2021
MaxBitRateDown : 50000000 bps (50.0 Mbps) MaxBitRateUp 3000000 bps (3.0 Mbps)
ExternalIPAddress = 62.30.63.90
i protocol exPort->inAddr:inPort description remoteHost leaseTime
0 UDP 9305->172.17.2.112:9305 '172.17.2.112:9305 to 9305 (UDP)' '' 0
1 UDP 9308->172.17.2.112:9308 '172.17.2.112:9308 to 9308 (UDP)' '' 0
GetGenericPortMappingEntry() returned 713 (SpecifiedArrayIndexInvalid)
| My underlying issue, which this demonstrates, is that the lease time is blank and the lease never expires.
On the gateway I am running miniupnpd-2.1-12. |
|
Back to top |
|
 |
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1594
|
Posted: Wed Aug 18, 2021 11:38 am Post subject: |
|
|
use to remove a lease.
Leases without expiry time... do not expire. _________________ Main miniUPnP author.
https://miniupnp.tuxfamily.org/ |
|
Back to top |
|
 |
NickH
Joined: 10 Feb 2018 Posts: 26
|
Posted: Wed Aug 18, 2021 11:44 am Post subject: |
|
|
Who sets the lease time? The client or miniupnpd server? In the DHCP model it is the server that sets the lease time. How does it work in UPNP? |
|
Back to top |
|
 |
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1594
|
Posted: Wed Aug 18, 2021 11:47 am Post subject: |
|
|
NickH wrote: | Who sets the lease time? The client or miniupnpd server? In the DHCP model it is the server that sets the lease time. How does it work in UPNP? |
The client sets the lease duration. _________________ Main miniUPnP author.
https://miniupnp.tuxfamily.org/ |
|
Back to top |
|
 |
NickH
Joined: 10 Feb 2018 Posts: 26
|
Posted: Wed Aug 18, 2021 12:08 pm Post subject: |
|
|
So this would be a bug in the PS4 software? |
|
Back to top |
|
 |
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1594
|
Posted: Wed Aug 18, 2021 3:20 pm Post subject: |
|
|
NickH wrote: | So this would be a bug in the PS4 software? |
what bug ?
I guess the software doesn't set a limited duration time because it is meant that way _________________ Main miniUPnP author.
https://miniupnp.tuxfamily.org/ |
|
Back to top |
|
 |
|