Turn an ESP8266 into a real Wi-Fi extender / mini router with NAT, web-based setup, auto Wi-Fi scanning, and credential storage.
✔ Works on most ESP8266 models
✔ True routing — not just repeating
This project converts an ESP8266 (NodeMCU) into a true NAT-based Wi-Fi extender:
- ESP8266 creates its own Wi-Fi Access Point (AP)
- ESP8266 connects to an existing router (STA mode)
- NAT (lwIP NAPT) routes traffic between AP ↔ STA
- Connected clients receive real internet access
- Configuration is done via a web interface
This is not just a repeater — it performs real routing like a mini router.
- Real NAT (lwIP NAPT)
- AP + STA mode simultaneously
- Web-based configuration
- Auto Wi-Fi scanning every 5 seconds
- SSID dropdown selection
- Password input
- Credentials saved in LittleFS
- Web reset (clears saved Wi-Fi)
- LED status indicators
- Works like a mini router
- AP SSID:
ESP_NAT_Extender - AP Password:
12345678 - AP IP Address:
192.168.4.1 - Web UI: http://192.168.4.1
- Automatically scans nearby Wi-Fi networks
- SSID list refreshes every 5 seconds
- Select SSID from dropdown
- Enter Wi-Fi password
- Connect to upstream router
- Reset saved credentials from the web
- No reboot required for scanning
Wi-Fi credentials are stored in: /wifi.txt
SSID PASSWORD
- Deletes
/wifi.txt - Reboots the ESP8266
- Restarts in fresh AP mode
- Power LED ON → Device powered and running
- Connection LED BLINKING → Scanning or connecting
- Connection LED SOLID ON → Connected, NAT active
- Long blinking → Wrong password or failed connection
- Web reset → LEDs briefly OFF, device restarts
- ESP8266 (NodeMCU / ESP-12E / ESP-12F)
- USB cable
- Stable 5V power supply
- Optional LEDs + resistors
Board : NodeMCU 1.0 (ESP-12E Module) CPU Frequency : 80 MHz Flash Size : 4MB Flash Mode : DIO LWIP Variant : v2 Higher Bandwidth Upload Speed : 115200
v2 Higher Bandwidth (no features) — NAT will not work.
- ESP8266WiFi
- ESPAsyncWebServer
- AsyncTCP
- LittleFS
- DNSServer
NAT (lwIP NAPT) is included in the ESP8266 core.
- Flash the code to ESP8266
- Power on the device
- Connect to Wi-Fi
SSID:ESP_NAT_Extender
Password:12345678 - Open browser and go to
http://192.168.4.1 - Select SSID
- Enter password
- Click Connect
- Wait for LED to turn solid
🎉 You now have internet through the ESP8266!
- Typical speed: 15–25 Mbps
- Depends on signal quality
- Suitable for browsing, IoT, light streaming
- Limited RAM (ESP8266)
- Not suitable for heavy traffic
- No WPA2-Enterprise
- No advanced firewall rules
Alen Krishna V.U
I have projects related to Python and Arduino ect
Visit my GitHub profile to explore more. Click here👇 https://github.com/AlenKrishna2012


