How to tell libp2p to NOT punch ports with UPnP?

How to disable UPnP? In go-ipfs, and also in other apps that use it (openbazaar)?
Even after manually opening a port, libp2p still punches the same port on the router via UPnP.

I don’t think there’s a switch to do it in go-ipfs. If there aren’t any applications you want to use UPnP, it might be easier to disable UPnP on your router.

edit: I was wrong. See below.

The following should do it:

ipfs config --json 'Swarm.DisableNatPortMap' true
1 Like

Thanks. This worked for openbazaar too. Dunno how I missed it when reading through the config looking for it.

Because our documentation is sorely lacking? Documentation improvements are always welcome!