ESP32 Wi-Fi NAT repeater
An original project that turns the ESP32-S3 into an access point, Wi-Fi client and NAT gateway, with an embedded configuration portal and DNS propagation for clients.
Communication and architecture flow
Industrial challenge / problem:
Factory floors and technical offices can have Wi-Fi blind spots. Commercial routers are bulky and require dedicated power infrastructure.
Technical solution developed:
ESP-IDF firmware with NAPT enabled in lwIP. The device connects to the main network through the Station interface, creates its own network through the Access Point interface and forwards traffic between both, propagating the router DNS through DHCP—the step often missing when a client connects but cannot browse. Arduino Core is not suitable here because its lwIP build does not include IP forwarding.
Project component list:
- ESP32-S3 N16R8 module board (16 MB flash, 8 MB octal PSRAM)
- Internal PCB antenna or external 2.4 GHz IPEX antenna
- 5 V 1 A USB supply or 24 V → 5 V DIN-rail regulator
- Adjustable protective enclosure
Expected result in operation:
Bench-validated: NAPT active on the AP interface with ESP_OK, DHCP propagating the router DNS, a connected client browsing for more than 8 minutes without reassociation, -39 dBm signal and 3 hours 48 minutes of continuous operation without a restart.
Open the tutorial
Install the environment, assemble the circuit, compile and validate it—with the complete firmware and PDF manual available to download.
Open the tutorial