espressif / esp-iot-solution

Espressif IoT Library. IoT Device Drivers, Documentations And Solutions.
Apache License 2.0
1.8k stars 740 forks source link

USB CDC 4G Modem - Port Forwarding (AEGHB-435) #304

Open aman-K14 opened 8 months ago

aman-K14 commented 8 months ago

Hello,

This issue is in continuation with a previously discussed issue. USB CDC 4G MODEM - SPEED ISSUE (AEGHB-412) #298

I am using ESP32S3-WROOM1-N16R8 with my 4G modem(N58 module - https://www.neoway.com/products/wireless-communication/823.html). Same setup as mentioned in issue AEGHB-412(#298)

When I connect 2 host to the my ESP access point, i am able to ping 1st host from the 2nd host using local ip assigned by ESP32 but when I try to ping the public IP of the ESP32 from a separate device, which on a different network, I am not able get any response. I believe this is because port forwarding is not enabled . How can I enable port forwarding? my end goal is to be able to access my esp32 and its connected hosts/node, from a separate WAN network.

Thanks, Aman

leeebo commented 8 months ago

@aman-K14 Devices in the ESP32 LAN can access the public IP through NAT. However, it is impossible for public network devices to access devices under ESP32 LAN (not invisible). If you want to achieve similar functions, you may need to use a third-party server. Please refer https://en.wikipedia.org/wiki/NAT_traversal