Merge bitcoin/bitcoin#33004: Enable -natpmp by default

b2d07f872c Add release notes for -natpmp enabled by default (Antoine Poinsot)
3fc660d267 mapport: turn -natpmp to on by default (Antoine Poinsot)

Pull request description:

  This turns the default for NAT hole-punching (with [PCP](https://en.wikipedia.org/wiki/Port_Control_Protocol) or [NAT-PMP](https://en.wikipedia.org/wiki/NAT_Port_Mapping_Protocol)) to on. Closes #31663.

ACKs for top commit:
  ajtowns:
    ACK b2d07f872c

Tree-SHA512: 7449510aa97ce225a662947184046cba6c8f0409719cd0b279639cedd8fdbf55a769a0088e66c7ac5b6ebabec9b2c81141ae14b7a87a5ad13be01d36c4e56661
This commit is contained in:
merge-script
2025-07-23 09:57:05 +01:00
2 changed files with 7 additions and 1 deletions

View File

@@ -0,0 +1,6 @@
Updated settings
----------------
* The `-natpmp` option is now set to `1` by default. This means nodes with `-listen` enabled (the
default) but running behind a firewall, such as a local network router, will be reachable if the
firewall/router supports any of the `PCP` or `NAT-PMP` protocols.

View File

@@ -5,7 +5,7 @@
#ifndef BITCOIN_MAPPORT_H
#define BITCOIN_MAPPORT_H
static constexpr bool DEFAULT_NATPMP = false;
static constexpr bool DEFAULT_NATPMP = true;
void StartMapPort(bool enable);
void InterruptMapPort();