# Install libnatpmp with Homebrew, apk, apt, dnf, MacPorts, Nix, pacman

NAT port mapping protocol library. Version 20230423 via Homebrew; verified from local package data.

## Install

```sh
sudo av install brew:libnatpmp
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install libnatpmp
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install libnatpmp
```

  Evidence: MacPorts ports tree: net/libnatpmp/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add libnatpmp
```

  Evidence: Alpine Linux edge package indexes: libnatpmp from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install libnatpmp-dev
```

  Evidence: Debian stable package indexes: libnatpmp-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install libnatpmp
```

  Evidence: Fedora Rawhide package metadata: libnatpmp from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#libnatpmp
```

  Evidence: nixpkgs package indexes: pkgs/by-name/li/libnatpmp/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S libnatpmp
```

  Evidence: Arch Linux sync databases: libnatpmp from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

## Package facts

- **Package key:** brew:libnatpmp
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/libnatpmp>
- **Version:** 20230423
- **Source summary:** NAT port mapping protocol library
- **Homepage:** <https://miniupnp.tuxfamily.org/libnatpmp.html>
- **Repository:** <https://github.com/miniupnp/libnatpmp>
- **Upstream docs:** <https://miniupnp.tuxfamily.org/libnatpmp.html>
- **License:** BSD-3-Clause
- **Source archive:** <https://miniupnp.tuxfamily.org/files/download.php?file=libnatpmp-20230423.tar.gz>
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- natpmpc (cli)
- natpmpc (alias)

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_big_sur, arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, big_sur, monterey, sonoma, ventura, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 20230423
- Local data: ok
- Upstream repository: https://miniupnp.tuxfamily.org/libnatpmp.html
- info: No package-manager update timestamp was available.
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

libnatpmp is the MiniUPnP project's small C client library for NAT Port Mapping Protocol, with a natpmpc command-line client for requesting mappings from NAT gateways.

### Project history

The official MiniUPnP page describes NAT-PMP as a NAT traversal protocol and positions libnatpmp as a client-side implementation. The GitHub README says the repository was initialized from libnatpmp-20120821 and records Thomas Bernard's 2007-2009 copyright.

The protocol context comes from RFC 6886: NAT-PMP automated NAT port mappings, was implemented in Apple products from 2005 onward, and was superseded in 2013 by Port Control Protocol while retaining a compatible packet-format lineage.

### Adoption history

libnatpmp's adoption follows the MiniUPnP ecosystem and peer-to-peer networking use cases where software wants an explicit router port mapping without relying on UPnP IGD. The MiniUPnP documentation includes examples for simple redirection and a P2P-style initialization state machine.

In package managers, libnatpmp is small but useful: it gives applications a portable asynchronous NAT-PMP client library and gives users the natpmpc tool for testing gateway support.

### How it is used

Applications initialize a natpmp_t object, send address or port-mapping requests, wait with select using the timeout helper, and read responses or retry. The API is intentionally event-loop-friendly because calls are asynchronous and based on non-blocking sockets.

### Why package nerds care

Package nerds care about libnatpmp because it is the tiny sharp tool beside MiniUPnP: one library, one protocol, one CLI, and enough C API to let network applications punch a NAT mapping when the gateway supports NAT-PMP.

### Timeline

- 2005: RFC 6886 later records NAT-PMP implementation in Apple products from this year onward.
- 2007-2009: libnatpmp source records Thomas Bernard's copyright range.
- 2012-08-21: The GitHub README says the repository was initialized from libnatpmp-20120821.
- 2013-04: RFC 6886 documents NAT-PMP and says PCP superseded it in 2013.
- 2020s: The library remains packaged as the MiniUPnP NAT-PMP client implementation.

### Related projects

- libnatpmp is related to MiniUPnP and MiniUPnPd, UPnP IGD, Apple's Bonjour-era NAT-PMP deployments, and the IETF Port Control Protocol that superseded NAT-PMP.

### Sources

- <https://datatracker.ietf.org/doc/html/rfc6886>
- <https://formulae.brew.sh/formula/libnatpmp>
- <https://github.com/miniupnp/libnatpmp>
- <https://github.com/miniupnp/miniupnp>
- <https://miniupnp.tuxfamily.org/libnatpmp.html>


## Security Notes

library-like package without higher-risk signals.

- **Geiger risk:** green / low
- library-like package without higher-risk signals

## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** libnatpmp
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

## Other Package-Manager Records

- Debian apt - libnatpmp-dev - 20230423-1.2+b3: normalized package name match | Debian stable package indexes: libnatpmp-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | portable and fully compliant implementation of NAT-PMP (dev files) | http://miniupnp.free.fr/libnatpmp.html
- Debian apt - libnatpmp1t64 - 20230423-1.2+b3: normalized package name match | Debian stable package indexes: libnatpmp1t64 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | portable and fully compliant implementation of NAT-PMP | http://miniupnp.free.fr/libnatpmp.html
- Debian apt - natpmpc - 20230423-1.2+b3: normalized package name match | Debian stable package indexes: natpmpc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | portable and fully compliant implementation of NAT-PMP (client) | http://miniupnp.free.fr/libnatpmp.html
- Debian apt - python3-libnatpmp - 20230423-1.2+b3: normalized package name match | Debian stable package indexes: python3-libnatpmp from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | portable and fully compliant implementation of NAT-PMP (Python 3 bindings) | http://miniupnp.free.fr/libnatpmp.html
- Nix - libnatpmp: normalized package name match | nixpkgs package indexes: pkgs/by-name/li/libnatpmp/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - libnatpmp-dev - 20230423-1.2build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libnatpmp-dev from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | portable and fully compliant implementation of NAT-PMP (dev files) | http://miniupnp.free.fr/libnatpmp.html
- Ubuntu apt - libnatpmp1t64 - 20230423-1.2build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libnatpmp1t64 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | portable and fully compliant implementation of NAT-PMP | http://miniupnp.free.fr/libnatpmp.html
- Ubuntu apt - natpmpc - 20230423-1.2build1: normalized package name match | Ubuntu 24.04 LTS package indexes: natpmpc from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | portable and fully compliant implementation of NAT-PMP (client) | http://miniupnp.free.fr/libnatpmp.html
- Ubuntu apt - python3-libnatpmp - 20230423-1.2build1: normalized package name match | Ubuntu 24.04 LTS package indexes: python3-libnatpmp from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | portable and fully compliant implementation of NAT-PMP (Python 3 bindings) | http://miniupnp.free.fr/libnatpmp.html
- apk - libnatpmp - 20230423-r0: normalized package name match | Alpine Linux edge package indexes: libnatpmp from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Portable and fully compliant implementation of the NAT-PMP protocol | http://miniupnp.free.fr/libnatpmp.html
- apk - libnatpmp-dev - 20230423-r0: normalized package name match | Alpine Linux edge package indexes: libnatpmp-dev from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Portable and fully compliant implementation of the NAT-PMP protocol (development files) | http://miniupnp.free.fr/libnatpmp.html
- apk - libnatpmp-doc - 20230423-r0: normalized package name match | Alpine Linux edge package indexes: libnatpmp-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Portable and fully compliant implementation of the NAT-PMP protocol (documentation) | http://miniupnp.free.fr/libnatpmp.html
- dnf - libnatpmp - 20230423-9.fc44: normalized package name match | Fedora Rawhide package metadata: libnatpmp from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Library of The NAT Port Mapping Protocol (NAT-PMP) | http://miniupnp.free.fr/libnatpmp.html
- dnf - libnatpmp-devel - 20230423-9.fc44: normalized package name match | Fedora Rawhide package metadata: libnatpmp-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Development files for libnatpmp | http://miniupnp.free.fr/libnatpmp.html
- pacman - libnatpmp - 20230423-3: normalized package name match | Arch Linux sync databases: libnatpmp from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | A portable and fully compliant implementation of the NAT-PMP protocol | http://miniupnp.free.fr/libnatpmp.html
- MacPorts - libnatpmp: normalized package name match | MacPorts ports tree: net/libnatpmp/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Related links

- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Web development packages](https://www.automicvault.com/pkg/web-dev-tools/) - Matched web development metadata.
- [Homebrew utility packages](https://www.automicvault.com/pkg/brew-utility-packages/) - Matched Homebrew package provider.
- [pwnat](https://www.automicvault.com/pkg/brew/pwnat/) - Shares av.db curated category or tags: cli, nat-traversal, networking.
- [stuntman](https://www.automicvault.com/pkg/brew/stuntman/) - Shares av.db curated category or tags: cli, nat-traversal, networking.
- [miniupnpc](https://www.automicvault.com/pkg/brew/miniupnpc/) - Shares av.db curated category or tags: cli, nat-traversal, networking.
- [c-ares](https://www.automicvault.com/pkg/brew/c-ares/) - Shares av.db curated category or tags: cli, library, networking.
- [czmq](https://www.automicvault.com/pkg/brew/czmq/) - Shares av.db curated category or tags: cli, library, networking.
- [dumbpipe](https://www.automicvault.com/pkg/brew/dumbpipe/) - Shares av.db curated category or tags: cli, nat-traversal, networking.
- [gupnp](https://www.automicvault.com/pkg/brew/gupnp/) - Shares av.db curated category or tags: cli, library, networking.
- [libnet](https://www.automicvault.com/pkg/brew/libnet/) - Shares av.db curated category or tags: cli, library, networking.

## Combined YAML source

View the package source record on GitHub. [combined/libnatpmp.yml](https://github.com/automic-vault/db/blob/main/combined/libnatpmp.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
