when you are developing an apsta app of esp, you should config int the menuconfig procedure, such as below:
- Component config -> LWIP > [x] Enable copy between Layer2 and Layer3 packets.
- Component config -> LWIP > [x] Enable IP forwarding.
- Component config -> LWIP > [x] Enable NAT (new/experimental).