diff --git a/components/lwip/Kconfig b/components/lwip/Kconfig index 2a1c742f66..9a8752efee 100644 --- a/components/lwip/Kconfig +++ b/components/lwip/Kconfig @@ -248,14 +248,14 @@ menu "LWIP" Enabling this option allows packets forwarding across multiple interfaces. config LWIP_IPV4_NAPT - bool "Enable NAT (new/experimental)" + bool "Enable NAT" depends on LWIP_IP_FORWARD default n help Enabling this option allows Network Address and Port Translation. config LWIP_IPV4_NAPT_PORTMAP - bool "Enable NAT Port Mapping (new/experimental)" + bool "Enable NAT Port Mapping" depends on LWIP_IPV4_NAPT default y help diff --git a/docs/en/api-guides/lwip.rst b/docs/en/api-guides/lwip.rst index 0691d389bc..907e48a4f9 100644 --- a/docs/en/api-guides/lwip.rst +++ b/docs/en/api-guides/lwip.rst @@ -419,6 +419,14 @@ IP Layer Features - IPV4-mapped IPV6 addresses are supported +NAPT and Port Forwarding +++++++++++++++++++++++++ + +IPV4 network address port translation (NAPT) and port forwarding are supported. However, the enabling of NAPT is limited to a single interface. + +- To use NAPT for forwarding packets between two interfaces, it needs to be enabled on the interface connecting to the target network. For example, to enable internet access for Ethernet traffic through the WiFi interface, NAPT must be enabled on the Ethernet interface. +- Usage of NAPT is demonstrated in :example:`network/vlan_support`. + .. _lwip-custom-hooks: Customized lwIP Hooks