martin-ger / esp32_nat_router

A simple NAT Router for the ESP32
1.33k stars 281 forks source link

portmapping does not get restored effectively after restart #112

Open mklingn opened 1 year ago

mklingn commented 1 year ago

Thanks for this great piece of work!

I have a single client behind my esp32_nat_router. It is an esp32-cam with esphome firmware and a fixed IP of 192.168.4.121

Via serial console I do a port mapping to connect to the esp32-cam's port 6053:

portmap add TCP 6054 192.168.4.121 6053

This works, until the next restart of esp32_nat_router. Although the esp32-cam gets re-connected successfully, connections to the forwarded port do time out.

"SHOW" still lists the portmapping, but it just does not seem to get applied - I looked at the code and it SHOULD be applied... Things I tried:

Connectivity via portmapping can only be restored by adding another, identical port mapping via the console, or removing and re-adding the existing one.

I suppose I have a strange combination here, because persistent port mapping does work for others, right?

geidien commented 10 months ago

Did you ever get any resolution to this issue?

mklingn commented 10 months ago

IIRC the solution was to use https://github.com/martin-ger/esp_wifi_repeater with an esp8266 :-/