ClearFoundation Tracker - ClearOS
View Issue Details
0006391ClearOSapp-upnp - UPnPpublic2015-11-23 10:442019-05-20 04:15
user2 
NickH 
normalfeaturehave not tried
closedfixed 
 
 
0006391: Audit for ClearOS 7
Migrate miniupnpd/uPnP to ClearOS 7.

Reference:
https://www.clearos.com/clearfoundation/social/community/clearos-module-miniupnp-daemon [^]
No tags attached.
Issue History
2015-11-23 10:44user2New Issue
2015-11-23 10:44user2Statusnew => confirmed
2015-11-23 10:45user2Description Updatedbug_revision_view_page.php?rev_id=651#r651
2016-03-22 02:18NickHNote Added: 0002901
2016-03-22 03:12NickHNote Added: 0002911
2016-06-28 14:08user2Target Version7.2.0 Updates =>
2019-05-20 04:15NickHNote Added: 0011991
2019-05-20 04:15NickHStatusconfirmed => closed
2019-05-20 04:15NickHAssigned To => NickH
2019-05-20 04:15NickHResolutionopen => fixed

Notes
(0002901)
NickH   
2016-03-22 02:17   
miniupnpd appears in clearos-fast-updates but does not appear to be working.

1 - /etc/sysconfig/miniupnpd is not being updated with the correct interfaces but stays at default:
# On a ClearOS system with app-miniupnpd package installed, these values
# are updated automatically.
MINIUPNPD_WAN="-i lo"
MINIUPNPD_LANS="-a lo"
MINIUPNPD_URL="-w https://192.168.1.1:81" [^]

changing it by hand corrects the startup line.

2 - The firewall chains MINIUPNPD is not being created on installation. It looks like the script /etc/miniupnpd/iptables_init.sh is not being run until the system is rebooted or, perhaps after a firewall restart

3 - "service miniupnpd status -l" gives one error: "Mar 22 07:59:25 hostname.howitts.co.uk miniupnpd[6375]: could not open lease file: /var/lib/miniupnpd/upnp.leases". I don't know how critical this is.

4 - if you use "chkconfig miniupnpd on" the service fails to run even after fixing 1):
[root@hostname ~]# service miniupnpd status -l
Redirecting to /bin/systemctl status -l miniupnpd.service
? miniupnpd.service - UPnP device server.
   Loaded: loaded (/usr/lib/systemd/system/miniupnpd.service; enabled; vendor preset: disabled)
   Active: failed (Result: start-limit) since Tue 2016-03-22 08:13:31 GMT; 57s ago
     Docs: man:miniupnpd(8)
  Process: 1093 ExecStart=/usr/sbin/miniupnpd -f /etc/miniupnpd/miniupnpd.conf $MINIUPNPD_WAN $MINIUPNPD_LANS $MINIUPNPD_URL (code=exited, status=1/FAILURE)

Mar 22 08:13:30 hostname.howitts.co.uk systemd[1]: miniupnpd.service: control process exited, code=exited status=1
Mar 22 08:13:30 hostname.howitts.co.uk systemd[1]: Failed to start UPnP device server..
Mar 22 08:13:30 hostname.howitts.co.uk systemd[1]: Unit miniupnpd.service entered failed state.
Mar 22 08:13:30 hostname.howitts.co.uk systemd[1]: miniupnpd.service failed.
Mar 22 08:13:31 hostname.howitts.co.uk systemd[1]: miniupnpd.service holdoff time over, scheduling restart.
Mar 22 08:13:31 hostname.howitts.co.uk systemd[1]: start request repeated too quickly for miniupnpd.service
Mar 22 08:13:31 hostname.howitts.co.uk systemd[1]: Failed to start UPnP device server..
Mar 22 08:13:31 hostname.howitts.co.uk systemd[1]: Unit miniupnpd.service entered failed state.
Mar 22 08:13:31 hostname.howitts.co.uk systemd[1]: miniupnpd.service failed.

Restarting it then fixes it although the lease file issue remains.
(0002911)
NickH   
2016-03-22 03:12   
There is another timing issue. Starting miniupnpd by enabling it through chkconfig fails as does restarting it through /etc/rc.d/rc.local. You can restart it through /etc/rc.d/rc.local by adding "sleep 300", but "sleep 120" on my VM does not work. It is like it either needs to fail fully from the initial start or it needs to wait until some other component is up and running. I've tried changing to After=network-online.target in the /usr/lib/systemd/system/miniupnpd.service file but it did not change anything.
(0011991)
NickH   
2019-05-20 04:15   
Fixed 18m ago.