esp32_nat_router
Active·★ 2.0k·Updated 2026-05-28
★ Hidden Gem★ Security & Safety
An AI-enabled NAT Router/Firewall for the ESP32
This firmware transforms an ESP32 into a versatile WiFi NAT router, offering functionalities like range extension, guest networks, and VPN routing via WireGuard. It provides advanced networking features including DHCP reservations, port forwarding, a firewall, and real-time packet capture, all configurable via a web interface or serial console.
#ESP32#NAT Router#WiFi Extender#WireGuard VPN#Firewall#Packet Capture#IoT Devices#Firmware
01
Features
01NAT Routing: Full WiFi NAT router with IP forwarding (15+ Mbps throughput)
02WireGuard VPN: Optional VPN tunnel for upstream traffic with automatic MSS clamping and Path MTU
03Web Interface: Web UI with password protection for easy configuration
04Firewall: Define ACL to restrict or monitor traffic
05PCAP Capture: Live packet capture can be streamed to Wireshark or other network tools
02
Compatibility
ESP32
Chip
Verified via docs
ESP32-C3
Chip
Verified via docs
ESP32-C6
Chip
Verified via docs
ESP32-S2
Chip
Verified via docs
ESP32-S3
Chip
Verified via docs
ESP-IDF
Build Framework
Verified via docs
03
Quick start
1
$ git clone https://github.com/martin-ger/esp32_nat_router.git
2
$ cd esp32_nat_router
3
$ python3 -m pip install pyserial
4
$ esptool.py --chip esp32 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0x1000 firmware_esp32/bootloader.bin 0x8000 firmware_esp32/partition-table.bin 0x10000 firmware_esp32/esp32_nat_router.bin
04
Use cases
↳Simple range extender for an existing WiFi network
↳An additional WiFi network for guests or IoT devices with restricted access
↳VPN-Router using WireGuard for secure upstream traffic
↳Converter from a corporate (WPA2-Enterprise) network to a regular (WPA-PSK) network
↳Debugging and monitoring of WiFi devices using PCAP capture
05
Alternatives
Related searches
Comments
Log in to leave a comment
- Phoenix ChenMay 4, 2026
ESP32 footprint means it deploys on inexpensive hardware.
- Blake ChenApr 27, 2026
AI-enabled NAT router and firewall on ESP32 is an impressive combination.
- MMarlowe PatelMar 31, 2026
Good for IoT applications where network management needs AI capabilities.
- SSpencer ZhangMar 13, 2026
Brings modern AI tooling to embedded networking hardware.