UPnP Runaway



  • Hey all. I apologize if this has been addressed in another post. I couldn't find a good match in my searches.

    We're currently running PFSense 2.2.4 (FreeBSD 10.1-RELEASE-p15), and seem to be having an issue with the UPnP service. If I look under Status > UPnP & NAT-PMP, I see sessions listed that are not connected (no device at the IP specified). There are over a 1000 entries, and probably not even 100 of them are valid.

    This manifests into 2 problems. One, we see all the CPUs on the system gradually increase in usage over the days/months. They might average 2-4% normally, but over time will ramp up to 30% on average. If we clear all currently connected UPnP sessions, then the CPU usage jumps back down to normal ranges.

    The second issue we see (probably caused by high CPU) is interface drops. Specifically, we see the following 2 error counters incrementing:
    dev.igb.0.mac_stats.missed_packets: 23360482
    dev.igb.0.mac_stats.recv_no_buff: 550845

    The drops start off minor, maybe just a couple a second. However, if we let the UPnP process continue without clearing sessions, the drops can ramp up to over 200/second. Once we clear out all UPnP sessions, those drops will stop.

    Has anyone seen anything like this before, or have any ideas on how to eliminate besides a chron job to clear UPnP sessions? I looked at the bug fixes for PFSense 2.3.x, and I did not see anything that specifically addressed this.

    If you need any config/logs, let me know and I can get them to you.



  • Bumping this, with added info.

    I've seen some posts that indicate this problem may be 1 or 2 noisy devices that are sending massive amounts of UPnP packets. That does not appear to be the case, as the UPnP sessions appear to be pretty evenly spread across many IPs. I also ran a packet capture at each interface facing the LAN, and did not see anything out of the ordinary.

    • Josh


  • UPNP sessions must be refreshed. Something is making them and keeping them alive.



  • I think that's the problem we're running into, that the UPnP sessions are not clearing. They will stay up on IPs that are not in use, and haven't been for hours/days.



  • Is the automatic rule cleaning part of the Miniupnp process, or is it something that PFSense must perform? In either case, is this tuneable at all?


Log in to reply