I’ve been able to setup WireGuard so that I can connect directly to my app from my laptop without it being publicly accessible (removing the service config from fly.toml)
But I would also like to be able to allow my app to connect to a service running on a port on my local machine (graphite running the statsd protocol on UDP port 8125). Is that possible to do? I don’t think I saw mention of it in various discussion I’ve seen about WireGuard on fly.io, but I might not have understood because I’m not as familiar with “peers” and “6PN addresses” and whatnot
Hey, you can definitely connect back to your laptop from your app. Your laptop gets an IP address on your 6PN (“IPv6 private networking”) subnet, which you can use to connect to it from your app.
I see an /120 in for “Addresses” in Wireguard, which I assume is the address range for the network. I tried that IP address as well as the addresses listed under flyctl wireguard list, but no luck.
I was trying from inside Elixir, by the way, with HTTPoison.get("http://[ipv6address]:4000/overview") and getting {:error, %HTTPoison.Error{reason: :econnrefused, id: nil}}. It could be that I’m testing incorrectly
Hmm, ok… so I can confirm that I can connect with HTTPoison to my local web server, but when I try to connect via UDP to my local graphite instance it doesn’t work. I’m using TelemetryMetricsStatsd and giving it the correct host (I finally found out you can’t seem to give it a string, so I’m giving it a tuple of the ipv6 address integers), but it’s giving a eafnosupport error.
Should I be able to connect via UDP? The note in the middle of this post implies there might be some sort of problem with UDP and WireGuard…