Forums

Resolved
0 votes
If you need UPnP functionality in ClearOS for things like gaming and TiVo from your LAN then you may want this app. It will automatically set up your firewall Port Forwards for you if you use any UPnP compliant game/console/app/TiVo/etc. It brings back the same functionality available in many domestic routers.

You can install it from the Marketplace or, for command line junkies:
yum install app-miniupnpd


The Webconfig only has a start and a stop button. The app will automatically detect your default WAN and all LAN interfaces. If you want it for your HotLAN there is an obvious edit in /etc/miniupnpd/miniupnpd_clearos.conf.

I seem to remember XBox users may need low ports (0-1023) for UPnP. In this case you'll need to make your edit to change the ranges at the end of /etc/miniupnpd/miniupnpd.conf then restart the app.

All other configuration items are also found in /etc/miniupnpd/miniupnpd.conf

Now a plea for help. I am not a PHP programmer, but in the Webconfig on the big empty screen, I'd like to be able to put some form of status, for example some of the output from "iptables -vL" nicely formatted. If anyone would like to contribute, please feel free to contact me by PM or post to this thread.
Thursday, March 22 2018, 03:34 PM
Share this post:
Responses (21)
  • Accepted Answer

    Saturday, September 01 2018, 09:43 PM - #Permalink
    Resolved
    0 votes
    Great!, will test it soon.

    Some of the WikiSuite interns are working on this app as well.
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, September 01 2018, 09:33 PM - #Permalink
    Resolved
    0 votes
    I have updated the app not to fail if the LAN is not yet configured. Also the parent app (app-miniupnpd) is now set to reload minupnpd if the network configuration changes (thanks to Darryl). Really this was needed for the last version of miniupnpd, but I had to release miniupnpd without it a couple of weeks ago as an urgent fix to a firewall panic. You can update both with a:
    yum update miniupnpd app-miniupnpd --enablerepo=clearos-contribs-testing
    I aim to release both into into clearos-contribs at the end of the week or early next week.
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, August 23 2018, 05:06 PM - #Permalink
    Resolved
    0 votes
    Thanks for your hard work on this Nick.
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, August 23 2018, 02:33 PM - #Permalink
    Resolved
    0 votes
    You wouldn't even need to reinstall the app, just configure the network and restart it. If it were running, and you make an interface change it would pick it up automatically. Just not if the app fails completely.

    Perhaps I should put in a check in the start up for a configured LAN and WAN. Something for the future.
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, August 23 2018, 01:53 PM - #Permalink
    Resolved
    1 votes
    You nailed it.

    Network card not configured. this is setup on a test vm, and many things were working on it, so I didn't look into the LAN config.

    Configured the LAN, uninstalled the app, reinstalled it to make sure it was using the default settings, and it started via web interface!

    Now if you need to check on anything else while we are at it let me know, I´m having the students test it as well.
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, August 23 2018, 07:22 AM - #Permalink
    Resolved
    0 votes
    That is not making sense. Line 1 is a comment and was in your earlier post so it should not be executed. Can you check you have a symlink in / from /bin to /usr/bin:
    ls -ls /bin


    Also it is not picking up your LAN's. What is the contents of /etc/clearos/network.conf? And the result of:
    ifconfig | egrep "^(e|p)" -A 1
    This will be all your interface IP's. If you really want, munge your WAN IP(s) but not your LAN IP's
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, August 22 2018, 11:26 PM - #Permalink
    Resolved
    0 votes
    you are right, I had placed it in the wrong line in that file, fixed it, ran it again as before, same result it seems

    I´m connected via ssh as root


    [root@clearos2 ~]# sh /etc/miniupnpd/init_clearos.sh
    /etc/miniupnpd/init_clearos.sh: line 1: !/bin/sh: No such file or directory


    here is the log line for the command above:
    Aug 22 19:49:40 clearos2 miniupnp-start: WAN=-i enp0s3 LAN= Options=




    [root@clearos2 ~]# ls -l /etc/miniupnpd/
    total 32
    -rwxr-xr-x 1 root root 933 Ago 22 19:36 init_clearos.sh
    -rwxr-xr-x 1 root root 673 Ago 21 15:33 ip6tables_init.sh
    -rwxr-xr-x 1 root root 444 Ago 21 15:33 ip6tables_removeall.sh
    -rwxr-xr-x 1 root root 1203 Ago 21 15:33 iptables_init.sh
    -rwxr-xr-x 1 root root 1448 Ago 21 15:33 iptables_removeall.sh
    -rwxr-xr-x 1 root root 93 Ago 21 15:33 miniupnpd_clearos.conf
    -rwxr-xr-x 1 root root 3211 Ago 21 15:33 miniupnpd.conf
    -rwxr-xr-x 1 root root 1367 Ago 21 15:33 miniupnpd_functions.sh
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, August 22 2018, 06:56 PM - #Permalink
    Resolved
    0 votes
    If you did the change to /etc/miniupnpd/init_clearos.sh before the "exit 0" line, the it has not worked.

    Can you check where you placed the line then just run:
    /etc/miniupnpd/init_clearos.sh
    on its own and pick the line out from the message log?

    Also please do a:
    ls -l /etc/miniupnpd/


    Can you confirm you are running as root?
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, August 22 2018, 06:44 PM - #Permalink
    Resolved
    0 votes
    Here you go

    [root@clearos2 ~]# nano /etc/miniupnpd/init_clearos.sh
    [root@clearos2 ~]# systemctl reset-failed miniupnpd.service
    [root@clearos2 ~]# systemctl start miniupnpd.service
    Job for miniupnpd.service failed because the control process exited with error code. See "systemctl status miniupnpd.service" and "journalctl -xe" for details.
    [root@clearos2 ~]#


    Looks Like the logs are seconds apart, i´m not sure where it starts and ends, so here is some of it


    Aug 22 15:35:57 clearos2 systemd: Starting UPnP device server....
    Aug 22 15:35:57 clearos2 iptables_init.sh: Nat table dirty; Cleaning...
    Aug 22 15:35:57 clearos2 iptables_init.sh: Filter table dirty; Cleaning...
    Aug 22 15:35:57 clearos2 systemd: miniupnpd.service: control process exited, code=exited status=1
    Aug 22 15:35:57 clearos2 miniupnpd: Usage:
    Aug 22 15:35:57 clearos2 miniupnpd: /usr/sbin/miniupnpd [-f config_file] [-i ext_ifname] [-o ext_ip]
    Aug 22 15:35:57 clearos2 miniupnpd: [-a listening_ip] [-p port] [-d] [-U] [-S] [-N]
    Aug 22 15:35:57 clearos2 miniupnpd: [-u uuid] [-s serial] [-m model_number]
    Aug 22 15:35:57 clearos2 miniupnpd: [-t notify_interval] [-P pid_filename]
    Aug 22 15:35:57 clearos2 miniupnpd: [-B down up] [-w url] [-r clean_ruleset_interval]
    Aug 22 15:35:57 clearos2 miniupnpd: [-A "permission rule"] [-b BOOTID]
    Aug 22 15:35:57 clearos2 miniupnpd: Notes:
    Aug 22 15:35:57 clearos2 miniupnpd: There can be one or several listening_ips.
    Aug 22 15:35:57 clearos2 miniupnpd: Notify interval is in seconds. Default is 30 seconds.
    Aug 22 15:35:57 clearos2 miniupnpd: Default pid file is '/var/run/miniupnpd.pid'.
    Aug 22 15:35:57 clearos2 miniupnpd: Default config file is '/etc/miniupnpd.conf'.
    Aug 22 15:35:57 clearos2 miniupnpd: With -d miniupnpd will run as a standard program.
    Aug 22 15:35:57 clearos2 miniupnpd: -S sets "secure" mode : clients can only add mappings to their own ip
    Aug 22 15:35:57 clearos2 miniupnpd: -U causes miniupnpd to report system uptime instead of daemon uptime.
    Aug 22 15:35:57 clearos2 miniupnpd: -N enables NAT-PMP functionality.
    Aug 22 15:35:57 clearos2 miniupnpd: -B sets bitrates reported by daemon in bits per second.
    Aug 22 15:35:57 clearos2 miniupnpd: -w sets the presentation url. Default is http address on port 80
    Aug 22 15:35:57 clearos2 miniupnpd: -A use following syntax for permission rules :
    Aug 22 15:35:57 clearos2 miniupnpd: (allow|deny) (external port range) ip/mask (internal port range)
    Aug 22 15:35:57 clearos2 miniupnpd: examples :
    Aug 22 15:35:57 clearos2 miniupnpd: "allow 1024-65535 192.168.1.0/24 1024-65535"
    Aug 22 15:35:57 clearos2 miniupnpd: "deny 0-65535 0.0.0.0/0 0-65535"
    Aug 22 15:35:57 clearos2 miniupnpd: -b sets the value of BOOTID.UPNP.ORG SSDP header
    Aug 22 15:35:57 clearos2 miniupnpd: -h prints this help and quits.
    Aug 22 15:35:57 clearos2 systemd: Failed to start UPnP device server..
    Aug 22 15:35:57 clearos2 systemd: Unit miniupnpd.service entered failed state.
    Aug 22 15:35:57 clearos2 systemd: miniupnpd.service failed.
    Aug 22 15:35:59 clearos2 systemd: miniupnpd.service holdoff time over, scheduling restart.
    Aug 22 15:35:59 clearos2 systemd: Starting UPnP device server....
    Aug 22 15:35:59 clearos2 iptables_init.sh: Nat table dirty; Cleaning...
    Aug 22 15:35:59 clearos2 iptables_init.sh: Filter table dirty; Cleaning...
    Aug 22 15:35:59 clearos2 miniupnpd: Usage:
    Aug 22 15:35:59 clearos2 miniupnpd: /usr/sbin/miniupnpd [-f config_file] [-i ext_ifname] [-o ext_ip]
    Aug 22 15:35:59 clearos2 miniupnpd: [-a listening_ip] [-p port] [-d] [-U] [-S] [-N]
    Aug 22 15:35:59 clearos2 miniupnpd: [-u uuid] [-s serial] [-m model_number]
    Aug 22 15:35:59 clearos2 miniupnpd: [-t notify_interval] [-P pid_filename]
    Aug 22 15:35:59 clearos2 miniupnpd: [-B down up] [-w url] [-r clean_ruleset_interval]
    Aug 22 15:35:59 clearos2 miniupnpd: [-A "permission rule"] [-b BOOTID]
    Aug 22 15:35:59 clearos2 miniupnpd: Notes:
    Aug 22 15:35:59 clearos2 miniupnpd: There can be one or several listening_ips.
    Aug 22 15:35:59 clearos2 miniupnpd: Notify interval is in seconds. Default is 30 seconds.
    Aug 22 15:35:59 clearos2 miniupnpd: Default pid file is '/var/run/miniupnpd.pid'.
    Aug 22 15:35:59 clearos2 miniupnpd: Default config file is '/etc/miniupnpd.conf'.
    Aug 22 15:35:59 clearos2 miniupnpd: With -d miniupnpd will run as a standard program.
    Aug 22 15:35:59 clearos2 miniupnpd: -S sets "secure" mode : clients can only add mappings to their own ip
    Aug 22 15:35:59 clearos2 miniupnpd: -U causes miniupnpd to report system uptime instead of daemon uptime.
    Aug 22 15:35:59 clearos2 miniupnpd: -N enables NAT-PMP functionality.
    Aug 22 15:35:59 clearos2 miniupnpd: -B sets bitrates reported by daemon in bits per second.
    Aug 22 15:35:59 clearos2 miniupnpd: -w sets the presentation url. Default is http address on port 80
    Aug 22 15:35:59 clearos2 miniupnpd: -A use following syntax for permission rules :
    Aug 22 15:35:59 clearos2 miniupnpd: (allow|deny) (external port range) ip/mask (internal port range)
    Aug 22 15:35:59 clearos2 miniupnpd: examples :
    Aug 22 15:35:59 clearos2 miniupnpd: "allow 1024-65535 192.168.1.0/24 1024-65535"
    Aug 22 15:35:59 clearos2 miniupnpd: "deny 0-65535 0.0.0.0/0 0-65535"
    Aug 22 15:35:59 clearos2 miniupnpd: -b sets the value of BOOTID.UPNP.ORG SSDP header
    Aug 22 15:35:59 clearos2 miniupnpd: -h prints this help and quits.
    Aug 22 15:35:59 clearos2 systemd: miniupnpd.service: control process exited, code=exited status=1
    Aug 22 15:35:59 clearos2 systemd: Failed to start UPnP device server..
    Aug 22 15:35:59 clearos2 systemd: Unit miniupnpd.service entered failed state.
    Aug 22 15:35:59 clearos2 systemd: miniupnpd.service failed.
    Aug 22 15:36:00 clearos2 systemd: miniupnpd.service holdoff time over, scheduling restart.
    Aug 22 15:36:00 clearos2 systemd: start request repeated too quickly for miniupnpd.service
    Aug 22 15:36:00 clearos2 systemd: Failed to start UPnP device server..
    Aug 22 15:36:00 clearos2 systemd: Unit miniupnpd.service entered failed state.
    Aug 22 15:36:00 clearos2 systemd: miniupnpd.service failed.


    FILE: /etc/miniupnpd/miniupnpd.conf


    # WAN network interface
    #ext_ifname=eth1
    #ext_ifname=xl1
    # if the WAN interface has several IP addresses, you
    # can specify the one to use below
    #ext_ip=

    # LAN network interfaces IPs / networks
    # there can be multiple listening ips for SSDP traffic.
    # should be under the form nnn.nnn.nnn.nnn/nn
    # HTTP is available on all interfaces
    # When MULTIPLE_EXTERNAL_IP is enabled, the external ip
    # address associated with the subnet follows. for example :
    # listening_ip=192.168.0.1/24 88.22.44.13
    #listening_ip=192.168.0.1/24
    #listening_ip=192.168.1.1/24
    #listening_ip=
    # port for HTTP (descriptions and SOAP) traffic. set 0 for autoselect.
    port=0

    # path to the unix socket used to communicate with MiniSSDPd
    # If running, MiniSSDPd will manage M-SEARCH answering.
    # default is /var/run/minissdpd.sock
    #minissdpdsocket=/var/run/minissdpd.sock

    # enable NAT-PMP support (default is no)
    enable_natpmp=yes

    # enable UPNP support (default is yes)
    enable_upnp=yes

    # chain names for netfilter (not used for pf or ipf).
    # default is MINIUPNPD for both
    #upnp_forward_chain=forwardUPnP
    #upnp_nat_chain=UPnP

    # lease file location
    lease_file=/var/lib/miniupnpd/upnp.leases

    # bitrates reported by daemon in bits per second
    bitrate_up=1000000
    bitrate_down=10000000

    # "secure" mode : when enabled, UPnP client are allowed to add mappings only
    # to their IP.
    secure_mode=yes
    #secure_mode=no

    # default presentation url is http address on port 80
    # If set to an empty string, no presentationURL element will appear
    # in the XML description of the device, which prevents MS Windows
    # from displaying an icon in the "Network Connections" panel.
    #presentation_url=http://www.mylan/index.php

    # report system uptime instead of daemon uptime
    system_uptime=yes

    # notify interval in seconds. default is 30 seconds.
    #notify_interval=240
    notify_interval=60

    # unused rules cleaning.
    # never remove any rule before this threshold for the number
    # of redirections is exceeded. default to 20
    #clean_ruleset_threshold=10
    # clean process work interval in seconds. default to 0 (disabled).
    # a 600 seconds (10 minutes) interval makes sense
    clean_ruleset_interval=600

    # log packets in pf
    #packet_log=no

    # ALTQ queue in pf
    # filter rules must be used for this to be used.
    # compile with PF_ENABLE_FILTER_RULES (see config.h file)
    #queue=queue_name1

    # tag name in pf
    #tag=tag_name1

    # make filter rules in pf quick or not. default is yes
    # active when compiled with PF_ENABLE_FILTER_RULES (see config.h file)
    #quickrules=no

    # uuid : generate your own with "make genuuid"
    uuid=60943e58-b9ff-42bc-a825-5cd04c359f57

    # serial and model number the daemon will report to clients
    # in its XML description
    serial=12345678
    model_number=1

    # UPnP permission rules
    # (allow|deny) (external port range) ip/mask (internal port range)
    # (allow|deny) (external port range) ip/mask (internal port range)
    # A port range is <min port>-<max port> or <port> if there is only
    # one port in the range.
    # ip/mask format must be nn.nn.nn.nn/nn
    # it is advised to only allow redirection of port above 1024
    # and to finish the rule set with "deny 0-65535 0.0.0.0/0 0-65535"
    allow 1024-65535 192.168.0.0/16 1024-65535
    allow 1024-65535 10.0.0.0/8 1024-65535
    allow 1024-65535 172.16.0.0/12 1024-65535
    deny 0-65535 0.0.0.0/0 0-65535
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, August 22 2018, 06:20 PM - #Permalink
    Resolved
    0 votes
    Please can you add the following line to /etc/miniupnpd/init_clearos.sh just before the exit line:
    logger -t miniupnp-start "WAN=$MINIUPNPD_WAN LAN=$MINIUPNPD_LANS Options=$MINIUPNPD_OPTIONS"
    Then restart miniupnpd and, from /var/log/messages, give me the line with "miniupnp-start" in it. Also please post your /etc/miniupnpd/miniupnpd.conf.
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, August 22 2018, 05:31 PM - #Permalink
    Resolved
    0 votes
    [root@clearos2 ~]# systemctl daemon-reload
    [root@clearos2 ~]#
    [root@clearos2 ~]#
    [root@clearos2 ~]# systemctl start miniupnpd.service
    Job for miniupnpd.service failed because the control process exited with error code. See "systemctl status miniupnpd.service" and "journalctl -xe" for details.
    [root@clearos2 ~]#
    [root@clearos2 ~]#
    [root@clearos2 ~]#
    [root@clearos2 ~]# systemctl reset-failed miniupnpd.service
    [root@clearos2 ~]#
    [root@clearos2 ~]#
    [root@clearos2 ~]# systemctl start miniupnpd.service
    Job for miniupnpd.service failed because the control process exited with error code. See "systemctl status miniupnpd.service" and "journalctl -xe" for details.
    [root@clearos2 ~]#
    [root@clearos2 ~]#
    [root@clearos2 ~]# systemctl status miniupnpd.service -l
    ● miniupnpd.service - UPnP device server.
    Loaded: loaded (/usr/lib/systemd/system/miniupnpd.service; enabled; vendor preset: disabled)
    Active: failed (Result: start-limit) since Qua 2018-08-22 13:29:07 -03; 10s ago
    Docs: man:miniupnpd(8)
    Process: 17352 ExecStart=/usr/sbin/miniupnpd -f /etc/miniupnpd/miniupnpd.conf $MINIUPNPD_START_OPTIONS (code=exited, status=1/FAILURE)
    Process: 17344 ExecStartPre=/etc/miniupnpd/init_clearos.sh (code=exited, status=0/SUCCESS)
    Process: 17321 ExecStartPre=/etc/miniupnpd/iptables_init.sh (code=exited, status=0/SUCCESS)

    Ago 22 13:29:05 clearos2.nitrosys.com.br miniupnpd[17352]: -h prints this help and quits.
    Ago 22 13:29:05 clearos2.nitrosys.com.br systemd[1]: miniupnpd.service: control process exited, code=exited status=1
    Ago 22 13:29:05 clearos2.nitrosys.com.br systemd[1]: Failed to start UPnP device server..
    Ago 22 13:29:05 clearos2.nitrosys.com.br systemd[1]: Unit miniupnpd.service entered failed state.
    Ago 22 13:29:05 clearos2.nitrosys.com.br systemd[1]: miniupnpd.service failed.
    Ago 22 13:29:07 clearos2.nitrosys.com.br systemd[1]: miniupnpd.service holdoff time over, scheduling restart.
    Ago 22 13:29:07 clearos2.nitrosys.com.br systemd[1]: start request repeated too quickly for miniupnpd.service
    Ago 22 13:29:07 clearos2.nitrosys.com.br systemd[1]: Failed to start UPnP device server..
    Ago 22 13:29:07 clearos2.nitrosys.com.br systemd[1]: Unit miniupnpd.service entered failed state.
    Ago 22 13:29:07 clearos2.nitrosys.com.br systemd[1]: miniupnpd.service failed.
    [root@clearos2 ~]#
    [root@clearos2 ~]#
    [root@clearos2 ~]#
    [root@clearos2 ~]#
    [root@clearos2 ~]#






    [root@clearos2 ~]# journalctl -xel

    Ago 22 13:29:04 clearos2.nitrosys.com.br systemd[1]: miniupnpd.service holdoff time over, scheduling restart.
    Ago 22 13:29:04 clearos2.nitrosys.com.br systemd[1]: Starting UPnP device server....
    -- Subject: Unit miniupnpd.service has begun start-up
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    --
    -- Unit miniupnpd.service has begun starting up.
    Ago 22 13:29:04 clearos2.nitrosys.com.br iptables_init.sh[17285]: Nat table dirty; Cleaning...
    Ago 22 13:29:04 clearos2.nitrosys.com.br iptables_init.sh[17285]: Filter table dirty; Cleaning...
    Ago 22 13:29:04 clearos2.nitrosys.com.br miniupnpd[17316]: Usage:
    Ago 22 13:29:04 clearos2.nitrosys.com.br miniupnpd[17316]: /usr/sbin/miniupnpd [-f config_file] [-i ext_ifname] [-o ext_ip]
    Ago 22 13:29:04 clearos2.nitrosys.com.br miniupnpd[17316]: [-a listening_ip] [-p port] [-d] [-U] [-S] [-N]
    Ago 22 13:29:04 clearos2.nitrosys.com.br miniupnpd[17316]: [-u uuid] [-s serial] [-m model_number]
    Ago 22 13:29:04 clearos2.nitrosys.com.br miniupnpd[17316]: [-t notify_interval] [-P pid_filename]
    Ago 22 13:29:04 clearos2.nitrosys.com.br miniupnpd[17316]: [-B down up] [-w url] [-r clean_ruleset_interval]
    Ago 22 13:29:04 clearos2.nitrosys.com.br miniupnpd[17316]: [-A "permission rule"] [-b BOOTID]
    Ago 22 13:29:04 clearos2.nitrosys.com.br miniupnpd[17316]: Notes:
    Ago 22 13:29:04 clearos2.nitrosys.com.br miniupnpd[17316]: There can be one or several listening_ips.
    Ago 22 13:29:04 clearos2.nitrosys.com.br miniupnpd[17316]: Notify interval is in seconds. Default is 30 seconds.
    Ago 22 13:29:04 clearos2.nitrosys.com.br miniupnpd[17316]: Default pid file is '/var/run/miniupnpd.pid'.
    Ago 22 13:29:04 clearos2.nitrosys.com.br miniupnpd[17316]: Default config file is '/etc/miniupnpd.conf'.
    Ago 22 13:29:04 clearos2.nitrosys.com.br miniupnpd[17316]: With -d miniupnpd will run as a standard program.
    Ago 22 13:29:04 clearos2.nitrosys.com.br miniupnpd[17316]: -S sets "secure" mode : clients can only add mappings to their own ip
    Ago 22 13:29:04 clearos2.nitrosys.com.br miniupnpd[17316]: -U causes miniupnpd to report system uptime instead of daemon uptime.
    Ago 22 13:29:04 clearos2.nitrosys.com.br miniupnpd[17316]: -N enables NAT-PMP functionality.
    Ago 22 13:29:04 clearos2.nitrosys.com.br miniupnpd[17316]: -B sets bitrates reported by daemon in bits per second.
    Ago 22 13:29:04 clearos2.nitrosys.com.br miniupnpd[17316]: -w sets the presentation url. Default is http address on port 80
    Ago 22 13:29:04 clearos2.nitrosys.com.br miniupnpd[17316]: -A use following syntax for permission rules :
    Ago 22 13:29:04 clearos2.nitrosys.com.br miniupnpd[17316]: (allow|deny) (external port range) ip/mask (internal port range)
    Ago 22 13:29:04 clearos2.nitrosys.com.br miniupnpd[17316]: examples :
    Ago 22 13:29:04 clearos2.nitrosys.com.br miniupnpd[17316]: "allow 1024-65535 192.168.1.0/24 1024-65535"
    Ago 22 13:29:04 clearos2.nitrosys.com.br miniupnpd[17316]: "deny 0-65535 0.0.0.0/0 0-65535"
    Ago 22 13:29:04 clearos2.nitrosys.com.br miniupnpd[17316]: -b sets the value of BOOTID.UPNP.ORG SSDP header
    Ago 22 13:29:04 clearos2.nitrosys.com.br miniupnpd[17316]: -h prints this help and quits.
    Ago 22 13:29:04 clearos2.nitrosys.com.br systemd[1]: miniupnpd.service: control process exited, code=exited status=1
    Ago 22 13:29:04 clearos2.nitrosys.com.br systemd[1]: Failed to start UPnP device server..
    -- Subject: Unit miniupnpd.service has failed
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    --
    -- Unit miniupnpd.service has failed.
    --
    -- The result is failed.
    Ago 22 13:29:04 clearos2.nitrosys.com.br systemd[1]: Unit miniupnpd.service entered failed state.
    Ago 22 13:29:04 clearos2.nitrosys.com.br systemd[1]: miniupnpd.service failed.
    Ago 22 13:29:05 clearos2.nitrosys.com.br systemd[1]: miniupnpd.service holdoff time over, scheduling restart.
    Ago 22 13:29:05 clearos2.nitrosys.com.br systemd[1]: Starting UPnP device server....
    -- Subject: Unit miniupnpd.service has begun start-up
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    --
    -- Unit miniupnpd.service has begun starting up.
    Ago 22 13:29:05 clearos2.nitrosys.com.br iptables_init.sh[17321]: Nat table dirty; Cleaning...
    Ago 22 13:29:05 clearos2.nitrosys.com.br iptables_init.sh[17321]: Filter table dirty; Cleaning...
    Ago 22 13:29:05 clearos2.nitrosys.com.br miniupnpd[17352]: Usage:
    Ago 22 13:29:05 clearos2.nitrosys.com.br miniupnpd[17352]: /usr/sbin/miniupnpd [-f config_file] [-i ext_ifname] [-o ext_ip]
    Ago 22 13:29:05 clearos2.nitrosys.com.br miniupnpd[17352]: [-a listening_ip] [-p port] [-d] [-U] [-S] [-N]
    Ago 22 13:29:05 clearos2.nitrosys.com.br miniupnpd[17352]: [-u uuid] [-s serial] [-m model_number]
    Ago 22 13:29:05 clearos2.nitrosys.com.br miniupnpd[17352]: [-t notify_interval] [-P pid_filename]
    Ago 22 13:29:05 clearos2.nitrosys.com.br miniupnpd[17352]: [-B down up] [-w url] [-r clean_ruleset_interval]
    Ago 22 13:29:05 clearos2.nitrosys.com.br miniupnpd[17352]: [-A "permission rule"] [-b BOOTID]
    Ago 22 13:29:05 clearos2.nitrosys.com.br miniupnpd[17352]: Notes:
    Ago 22 13:29:05 clearos2.nitrosys.com.br miniupnpd[17352]: There can be one or several listening_ips.
    Ago 22 13:29:05 clearos2.nitrosys.com.br miniupnpd[17352]: Notify interval is in seconds. Default is 30 seconds.
    Ago 22 13:29:05 clearos2.nitrosys.com.br miniupnpd[17352]: Default pid file is '/var/run/miniupnpd.pid'.
    Ago 22 13:29:05 clearos2.nitrosys.com.br miniupnpd[17352]: Default config file is '/etc/miniupnpd.conf'.
    Ago 22 13:29:05 clearos2.nitrosys.com.br miniupnpd[17352]: With -d miniupnpd will run as a standard program.
    Ago 22 13:29:05 clearos2.nitrosys.com.br miniupnpd[17352]: -S sets "secure" mode : clients can only add mappings to their own ip
    Ago 22 13:29:05 clearos2.nitrosys.com.br miniupnpd[17352]: -U causes miniupnpd to report system uptime instead of daemon uptime.
    Ago 22 13:29:05 clearos2.nitrosys.com.br miniupnpd[17352]: -N enables NAT-PMP functionality.
    Ago 22 13:29:05 clearos2.nitrosys.com.br miniupnpd[17352]: -B sets bitrates reported by daemon in bits per second.
    Ago 22 13:29:05 clearos2.nitrosys.com.br miniupnpd[17352]: -w sets the presentation url. Default is http address on port 80
    Ago 22 13:29:05 clearos2.nitrosys.com.br miniupnpd[17352]: -A use following syntax for permission rules :
    Ago 22 13:29:05 clearos2.nitrosys.com.br miniupnpd[17352]: (allow|deny) (external port range) ip/mask (internal port range)
    Ago 22 13:29:05 clearos2.nitrosys.com.br miniupnpd[17352]: examples :
    Ago 22 13:29:05 clearos2.nitrosys.com.br miniupnpd[17352]: "allow 1024-65535 192.168.1.0/24 1024-65535"
    Ago 22 13:29:05 clearos2.nitrosys.com.br miniupnpd[17352]: "deny 0-65535 0.0.0.0/0 0-65535"
    Ago 22 13:29:05 clearos2.nitrosys.com.br miniupnpd[17352]: -b sets the value of BOOTID.UPNP.ORG SSDP header
    Ago 22 13:29:05 clearos2.nitrosys.com.br miniupnpd[17352]: -h prints this help and quits.
    Ago 22 13:29:05 clearos2.nitrosys.com.br systemd[1]: miniupnpd.service: control process exited, code=exited status=1
    Ago 22 13:29:05 clearos2.nitrosys.com.br systemd[1]: Failed to start UPnP device server..
    -- Subject: Unit miniupnpd.service has failed
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    --
    -- Unit miniupnpd.service has failed.
    --
    -- The result is failed.
    Ago 22 13:29:05 clearos2.nitrosys.com.br systemd[1]: Unit miniupnpd.service entered failed state.
    Ago 22 13:29:05 clearos2.nitrosys.com.br systemd[1]: miniupnpd.service failed.
    Ago 22 13:29:07 clearos2.nitrosys.com.br systemd[1]: miniupnpd.service holdoff time over, scheduling restart.
    Ago 22 13:29:07 clearos2.nitrosys.com.br systemd[1]: start request repeated too quickly for miniupnpd.service
    Ago 22 13:29:07 clearos2.nitrosys.com.br systemd[1]: Failed to start UPnP device server..
    -- Subject: Unit miniupnpd.service has failed
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    --
    -- Unit miniupnpd.service has failed.
    --
    -- The result is failed.
    Ago 22 13:29:07 clearos2.nitrosys.com.br systemd[1]: Unit miniupnpd.service entered failed state.
    Ago 22 13:29:07 clearos2.nitrosys.com.br systemd[1]: miniupnpd.service failed.
    Ago 22 13:30:01 clearos2.nitrosys.com.br systemd[1]: Started Session 115 of user root.
    -- Subject: Unit session-115.scope has finished start-up
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    --
    -- Unit session-115.scope has finished starting up.
    --
    -- The start-up result is done.
    Ago 22 13:30:01 clearos2.nitrosys.com.br systemd[1]: Starting Session 115 of user root.
    -- Subject: Unit session-115.scope has begun start-up
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    --
    -- Unit session-115.scope has begun starting up.
    Ago 22 13:30:01 clearos2.nitrosys.com.br systemd[1]: Started Session 113 of user root.
    -- Subject: Unit session-113.scope has finished start-up
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    --
    -- Unit session-113.scope has finished starting up.
    --
    -- The start-up result is done.
    Ago 22 13:30:01 clearos2.nitrosys.com.br systemd[1]: Starting Session 113 of user root.
    -- Subject: Unit session-113.scope has begun start-up
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    --
    -- Unit session-113.scope has begun starting up.
    Ago 22 13:30:01 clearos2.nitrosys.com.br systemd[1]: Started Session 116 of user root.
    -- Subject: Unit session-116.scope has finished start-up
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    --
    -- Unit session-116.scope has finished starting up.
    --
    -- The start-up result is done.
    Ago 22 13:30:01 clearos2.nitrosys.com.br systemd[1]: Starting Session 116 of user root.
    -- Subject: Unit session-116.scope has begun start-up
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    --
    -- Unit session-116.scope has begun starting up.
    Ago 22 13:30:01 clearos2.nitrosys.com.br systemd[1]: Started Session 114 of user root.
    -- Subject: Unit session-114.scope has finished start-up
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    --
    -- Unit session-114.scope has finished starting up.
    --
    -- The start-up result is done.
    Ago 22 13:30:01 clearos2.nitrosys.com.br systemd[1]: Starting Session 114 of user root.
    -- Subject: Unit session-114.scope has begun start-up
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    --
    -- Unit session-114.scope has begun starting up.
    Ago 22 13:30:01 clearos2.nitrosys.com.br CROND[17418]: (root) CMD (LANG=en_US /usr/clearos/apps/base/deploy/servicewatch >/dev/null 2>&1)
    Ago 22 13:30:02 clearos2.nitrosys.com.br CROND[17421]: (root) CMD (/usr/sbin/network2db >/dev/null 2>&1)
    Ago 22 13:30:02 clearos2.nitrosys.com.br systemd[1]: Started Session 117 of user root.
    -- Subject: Unit session-117.scope has finished start-up
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    --
    -- Unit session-117.scope has finished starting up.
    --
    -- The start-up result is done.
    Ago 22 13:30:02 clearos2.nitrosys.com.br systemd[1]: Starting Session 117 of user root.
    -- Subject: Unit session-117.scope has begun start-up
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    --
    -- Unit session-117.scope has begun starting up.
    Ago 22 13:30:02 clearos2.nitrosys.com.br CROND[17422]: (root) CMD (/usr/sbin/events-notification -i > /dev/null 2>&1)
    Ago 22 13:30:02 clearos2.nitrosys.com.br CROND[17423]: (root) CMD (/usr/lib64/sa/sa1 1 1)
    Ago 22 13:30:02 clearos2.nitrosys.com.br CROND[17425]: (root) CMD (/usr/sbin/resource2db >/dev/null 2>&1)

    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, August 22 2018, 04:04 PM - #Permalink
    Resolved
    0 votes
    Or try as it says:
    systemctl reset-failed miniupnpd.service
    systemctl start miniupnpd.service
    Then please have a look in the logs for any problems and, again, try doing what it says:
    systemctl status miniupnpd.service -l
    journalctl -xel
    Although I've just seen an oddity where it says it could not find my WAN IP once.
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, August 22 2018, 03:50 PM - #Permalink
    Resolved
    0 votes
    Please try executing the command:
    systemctl daemon-reload
    Then try starting miniupnpd.

    If it works, the rpm packaging should look after that bit.
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, August 22 2018, 03:32 PM - #Permalink
    Resolved
    0 votes
    I have both files

    [root@clearos2 ~]# systemctl start miniupnpd.service
    Job for miniupnpd.service failed because the control process exited with error code. See "systemctl status miniupnpd.service" and "journalctl -xe" for details.


    ran again and got

    [root@clearos2 ~]# systemctl start miniupnpd.service
    Job for miniupnpd.service failed because start of the service was attempted too often. See "systemctl status miniupnpd.service" and "journalctl -xe" for details.
    To force a start use "systemctl reset-failed miniupnpd.service" followed by "systemctl start miniupnpd.service" again.


    Ran "service miniupnp start" and got

    [root@clearos2 ~]# 
    Redirecting to /bin/systemctl start miniupnp.service
    Failed to start miniupnp.service: Unit not found.



    FILE : /usr/lib/systemd/system/miniupnpd.service


    [Unit]
    Description=UPnP device server.
    Documentation=man:miniupnpd(8)
    After=network.target firewall.service

    [Service]
    Type=forking
    ExecStartPre=-/etc/miniupnpd/iptables_init.sh
    ExecStartPre=-/etc/miniupnpd/init_clearos.sh
    ExecStart=/usr/sbin/miniupnpd -f /etc/miniupnpd/miniupnpd.conf $MINIUPNPD_START_OPTIONS
    ExecStartPost=-/usr/bin/systemctl unset-environment MINIUPNPD_START_OPTIONS
    ExecStopPost=-/etc/miniupnpd/iptables_removeall.sh

    Restart=always
    RestartSec=1
    TimeoutSec=5

    [Install]
    WantedBy=multi-user.target




    FILE: /etc/miniupnpd/init_clearos.sh


    #!/bin/sh

    #
    # Prep the parameters to pass to systemd
    #

    # Source networking configuration.
    . /etc/clearos/network.conf

    # Source miniupnpd_clearos.conf configuration.
    . /etc/miniupnpd/miniupnpd_clearos.conf

    # Determine WAN interface default route
    MINIUPNPD_WAN="-i `LC_ALL=C ip -4 route | grep 'default' | sed -e 's/.*dev[[:space:]]*//' -e 's/[[:space:]].*//'`"

    # kludge for when WAN goes down to stop miniupnpd failing
    if [ "$MINIUPNPD_WAN" = "-i " ]; then
    MINIUPNPD_WAN="-i lo"
    fi

    # List all the LAN's with the correct config parameter
    MINIUPNPD_LANS=""
    for LAN in $LANIF; do
    MINIUPNPD_LANS="$MINIUPNPD_LANS-a $LAN "
    done

    if [ "$USE_HOTLAN" = "yes" -a ! -z "$HOTIF" ]; then
    MINIUPNPD_LANS="$MINIUPNPD_LANS-a $HOTIF "
    fi

    systemctl set-environment MINIUPNPD_START_OPTIONS="$MINIUPNPD_WAN $MINIUPNPD_LANS $MINIUPNPD_OPTIONS"

    exit 0
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, August 22 2018, 03:13 PM - #Permalink
    Resolved
    0 votes
    The "service" is created by the miniupnpd package. There should be a unit file /usr/lib/systemd/system/miniupnpd.service. Do you have it?

    Also please check if you have the file /etc/miniupnpd/init_clearos.sh.

    Perhaps post their contents?

    What happens when you do a:
    systemctl start miniupnpd.service
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, August 22 2018, 02:51 PM - #Permalink
    Resolved
    0 votes
    I have update with the command suggested, rebooted and still not working

    yum update miniupnpd --disablerepo=* --enablerepo=clearos-contribs-testing


    [root@clearos2 ~]# rpm -q app-miniupnpd
    app-miniupnpd-0.9.0-3.v7.noarch
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, August 22 2018, 02:18 PM - #Permalink
    Resolved
    0 votes
    Ben says the version issue is because the repos are in a state of change at the moment. You can check your version with:
    rpm -q app-miniupnpd
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, August 22 2018, 02:12 PM - #Permalink
    Resolved
    0 votes
    The app has a serious problem which revealed itself after the 7.5 upgrade with the symptom that the firewall would panic on boot. I fixed that by forcing it to start after the firewall but that introduced another issue where the firewall would then hang on a firewall restart. Fixed that and it seemed OK. Another kernel update and it was back to a firewall panic on boot. Yuck!

    I reworked the interaction with the firewall last night so it starts after the firewall on boot and does not then hang the firewall on a firewall restart. It is currently in clearos-contribs-testing. I have rebooted a few times and restarted the firewall a few times and it appears to work as intended. You can update to the latest version of miniupnpd with:
    yum update miniupnpd --disablerepo=* --enablerepo=clearos-contribs-testing
    Miniupnpd will go to 2.1-7. The app itself is at 0.9.0-3. I don't know why you are seeing 0.9.0-1 as current. I think that is nothing to do with me, but is a problem in the webconfig widget. I'll have to ask Ben.
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, August 22 2018, 01:57 PM - #Permalink
    Resolved
    0 votes
    It looks like the app is not working right now

    I´ve installed it and it does not create a service and it does not start via web interface or console.

    I also noticed some discrepancies on the current version and the installed version

    https://farm2.staticflickr.com/1858/42389748280_030d9d739d_z.jpg

    There is no alternate or older version to install

    [root@clearos2 ~]# yum list app-miniupnpd --showduplicates
    Loaded plugins: clearcenter-marketplace, fastestmirror
    ClearCenter Marketplace: fetching repositories...
    Loading mirror speeds from cached hostfile
    * clearos: mirror1-newyork.clearos.com
    * clearos-centos-sclo-rh: download1.clearsdn.com
    * clearos-centos-verified: mirror1-newyork.clearos.com
    * clearos-contribs: mirror1-newyork.clearos.com
    * clearos-epel-verified: mirror1-newyork.clearos.com
    * clearos-fast-updates: download1.clearsdn.com
    * clearos-infra: mirror1-newyork.clearos.com
    * clearos-updates: mirror1-newyork.clearos.com
    * clearos-verified: mirror1-newyork.clearos.com
    * private-clearcenter-dyndns: download2.clearsdn.com:80
    * private-clearcenter-verified-updates: download4.clearsdn.com:80
    Available Packages
    app-miniupnpd.noarch 1:0.9.0-3.v7 clearos-contribs
    [root@clearos2 ~]#


    Here is a file list after its installed

    [root@clearos2 ~]# locate miniupnp
    /etc/miniupnpd
    /etc/clearos/firewall.d/40-miniupnpd
    /etc/miniupnpd/init_clearos.sh
    /etc/miniupnpd/ip6tables_init.sh
    /etc/miniupnpd/ip6tables_removeall.sh
    /etc/miniupnpd/iptables_init.sh
    /etc/miniupnpd/iptables_removeall.sh
    /etc/miniupnpd/miniupnpd.conf
    /etc/miniupnpd/miniupnpd_clearos.conf
    /etc/miniupnpd/miniupnpd_functions.sh
    /etc/systemd/system/multi-user.target.wants/miniupnpd.service
    /usr/clearos/apps/miniupnpd
    /usr/clearos/apps/miniupnpd/controllers
    /usr/clearos/apps/miniupnpd/deploy
    /usr/clearos/apps/miniupnpd/htdocs
    /usr/clearos/apps/miniupnpd/language
    /usr/clearos/apps/miniupnpd/controllers/miniupnpd.php
    /usr/clearos/apps/miniupnpd/controllers/server.php
    /usr/clearos/apps/miniupnpd/deploy/info.php
    /usr/clearos/apps/miniupnpd/deploy/install
    /usr/clearos/apps/miniupnpd/htdocs/miniupnpd.svg
    /usr/clearos/apps/miniupnpd/language/en_US
    /usr/clearos/apps/miniupnpd/language/en_US/miniupnpd_lang.php
    /usr/lib/systemd/system/miniupnpd.service
    /usr/sbin/miniupnpd
    /usr/share/man/man8/miniupnpd.8.gz
    /var/clearos/miniupnpd
    /var/clearos/base/daemon/miniupnpd.php
    /var/clearos/framework/cache/app-miniupnpd
    /var/lib/miniupnpd
    [root@clearos2 ~]#


    Any Suggestions
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, April 05 2018, 02:21 PM - #Permalink
    Resolved
    0 votes
    It should not. You should get a miniupnpd.conf.rpmnew and it will obsolete the /etc/sysconfig/miniupnpd file. In miniupnpd.conf you probably want to remove any internal or external interfaces you have configured as the app will determine them "on-the-fly" as it starts, but does not write to the configuration file.
    The reply is currently minimized Show
  • Accepted Answer

    Bane
    Bane
    Offline
    Thursday, April 05 2018, 02:03 PM - #Permalink
    Resolved
    0 votes
    Will installing from the marketplace overwrite existing miniupnpd config files?

    Thanks,
    The reply is currently minimized Show
Your Reply