IP forwarding not working with esp32-at-ppp

StarkRG
Posts: 1
Joined: Tue Jan 07, 2020 3:55 pm

IP forwarding not working with esp32-at-ppp

Postby StarkRG » Sun Jan 12, 2020 8:18 am

I'm trying to set up a wifi modem for an old Mac laptop. I've got them communicating over serial, the AT commands are working, the ESP32 is connecting to my wifi as a station and it's able to ping and do other internet things (such as to resolve a domain name). Using the esp32-at-ppp modification created by epooch, I'm even able to get the mac to apparently connect to the PPP server and it's able to ping the ESP32. What doesn't seem to be happening, though, is the forwarding of packets between the wifi and PPP connections (or provide DHCP over the PPP connection, though I'm not clear whether that's supposed to happen or not, the laptop is only able to get the IP from the PPP server, it doesn't get a "router" IP).

There's not a lot of documentation, but what there is suggests that the only thing that should be necessary is to run the patches, then enable PPP support and then PPP server support.

How the network is set up:
main router at 192.168.20.1 (provides DHCP and a DNS proxy)
main computer at 192.168.20.2
ESP getting 192.168.20.10

The laptop's dial script is set up to start PPPD with an IP of 192.168.10.1 for the esp and 192.168.10.2 for the laptop (I've tried different values such as the 192.168.4.X range used by default for the SoftAP DHCP server, it makes no difference). I've tried with and without enabling copy between Layer2 and Layer3 packets with no apparent effect.

One interesting thing I discovered just now, I can ping the ESP's "external" IP (the 192.168.20.10 address) from the mac laptop so it's obviously recognizing that the external IP is itself even when accessed from the PPPD side. I don't know if this helps with diagnosing the problem. I can't, however, ping the PPPD's IP from my main computer (ie, the router doesn't recognize the 192.168.10.x range of addresses). I've just tried setting up a static route in my router to route all 192.168.10.X addresses through 192.168.20.10 and pinging 192.168.10.1 gets a response but pinging 192.168.10.2 doesn't. Pinging out from the laptop to the network still doesn't work.

Who is online

Users browsing this forum: Baidu [Spider], Google [Bot], WiFive and 17 guests