miniupnp/miniupnp logo

miniupnp/miniupnp

Free

UPnP IGD implementation

FreeFree tier
Type
Open Source

About miniupnp/miniupnp

MiniUPnP is a lightweight, open-source implementation of the UPnP Internet Gateway Device (IGD) protocol, including support for NAT-PMP and PCP. It provides a client library (miniupnpc) for controlling UPnP-enabled home routers and a daemon (miniupnpd) that acts as a UPnP IGD and NAT gateway. Additional components include an SSDP managing daemon (minissdpd) and proof-of-concept asynchronous client implementations (miniupnpc-async, miniupnpc-libevent, miniupnpc-libuv). Written in pure ANSI C with no external dependencies, it supports POSIX systems (Linux, BSDs, macOS, Solaris), Windows, and AmigaOS. The daemon works with netfilter, nftables, pf, ipfw, or ipf firewall frameworks.

Key Features

UPnP IGD client library (miniupnpc) for controlling UPnP-enabled routers
UPnP IGD daemon (miniupnpd) with NAT-PMP and PCP gateway support
SSDP managing daemon (minissdpd) for service discovery
Pure ANSI C implementation with zero external dependencies
Cross-platform: POSIX (Linux, BSDs, macOS, Solaris), Windows, AmigaOS
Supports multiple firewall frameworks: netfilter, nftables, pf, ipfw, ipf

Pros & Cons

Pros
  • Lightweight with minimal footprint, suitable for embedded systems
  • No external dependencies, easy to compile and integrate
  • Broad OS support including legacy systems like AmigaOS
  • Open source with permissive license (BSD-style from repository)
  • Supports multiple NAT traversal protocols (UPnP IGD, NAT-PMP, PCP)
Cons
  • Lacks a graphical user interface; primarily command-line or daemon-based
  • Documentation may be sparse, relying on community and source code
  • Limited to IGD functionality; does not cover UPnP MediaServer/MediaRenderer
  • Daemon configuration requires familiarity with firewall and NAT concepts

Best For

Creating port forwarding rules on home/office UPnP-compatible routersImplementing NAT-PMP or PCP gateways on firewall appliancesEmbedding UPnP IGD control in lightweight embedded systemsBuilding network diagnostic tools for UPnP device managementDeveloping custom SSDP service managers for media servers

FAQ

What is MiniUPnP?
MiniUPnP is a free, open-source software suite that implements the UPnP Internet Gateway Device (IGD) specification, along with NAT-PMP and PCP support. It includes a client library, a daemon, and an SSDP managing daemon, all written in pure ANSI C without external dependencies.
Which operating systems are supported?
MiniUPnP client (miniupnpc) works on any POSIX system, Microsoft Windows, and AmigaOS. The daemon (miniupnpd) supports OpenBSD, FreeBSD, NetBSD, DragonFly BSD, Solaris, macOS with pf/ipfw/ipf, and Linux with netfilter or nftables.
Does MiniUPnP support NAT-PMP?
Yes, NAT-PMP and PCP support were added to MiniUPnPd. Client-side NAT-PMP is handled by the separate libnatpmp library.