Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connect to ESPAsyncWebServer / ArduinoOTA / Services on ESP32 #37

Open
itsyoshio opened this issue Jan 18, 2024 · 5 comments
Open

Connect to ESPAsyncWebServer / ArduinoOTA / Services on ESP32 #37

itsyoshio opened this issue Jan 18, 2024 · 5 comments

Comments

@itsyoshio
Copy link

Hi, i'm using the Example code and Outbound connections work well.

I've successfully pinged my Router (also the Wireguard Server) and used the WiFiClient to fetch a Website on my Wireguard Network over HTTP.

The ESP32 i use as the Wireguard Client also runs a ESPAsyncWebServer (port 80) and ArduinoOTA (port 32537).

I can't ping it, i can't access the Webserver and OTA Updates also don't work within the VPN, but do run over Ethernet or Wifi directly.

Any help would be appreciated.

@Shinmera
Copy link

I'm having the same issue using the standard esp_http_server. Outbound is OK, inbound ends up with unreachable address.

Is there some kind of routing we have to perform to make sure the packets arrive at the correct place?

@MrKappa
Copy link

MrKappa commented Feb 26, 2024

Have you in the Peer's allowed IPs the IP or the subnet containing your interface IP address?

@Shinmera
Copy link

In my case yes. I'm using exactly the same configuration as for every other client in the net, and the rest work just fine.

@MrKappa
Copy link

MrKappa commented Feb 26, 2024

In my case yes. I'm using exactly the same configuration as for every other client in the net, and the rest work just fine.

Is your device wg ip pingable? If yes, looks like the problem could be that the service isn't listening/binding to the wg created interface. Can you try to start the tunnel and then initialize/start your services? Otherwise I'd look how those services bind to the network interfaces.

@Shinmera
Copy link

Shinmera commented Nov 5, 2024

In my case yes. I'm using exactly the same configuration as for every other client in the net, and the rest work just fine.

Is your device wg ip pingable? If yes, looks like the problem could be that the service isn't listening/binding to the wg created interface. Can you try to start the tunnel and then initialize/start your services? Otherwise I'd look how those services bind to the network interfaces.

Pinging the local IP of the ESP works fine, but if I ping the WireGuard VPN IP, it says that the destination host is unreachable.

I thought to try and ping something from the ESP first, like the WireGuard server, but that also fails, so it just seems to me like it's not establishing the connection properly at all? I can ping that same VPN IP fine from another computer.

E: interestingly, after the wg.begin I also can't seem to fetch ntp data anymore either, it just hangs on that. Fun.
E2: Tried using https://github.com/ciniml/WireGuard-ESP32-Arduino and specifying a specific 255.255.255.0 subnet, and updated the ESP32 library to 3.0.0, but that also didn't help. Still much the same behaviour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants