Hacker News new | past | comments | ask | show | jobs | submit login

I looked a bit into Wireguard.

But it seems it's only really useful with static IPs.

Say my "Server" is behind a DDns Hostname and i want to connect to it from my Phone.

So my problem is. I allow incoming from 0.0.0.0 but on my mobile the DDns Hostname gets compiled to a specific IP.

OpenVpn has no problem with this setup. Is it solvable with Wireguard?

wg-dynamic seems to tackle this but wasn't really ready last time i checked




Wireguard comes with an example script [1] that does DNS updates for peers, which works well for me in a cron job. Archwiki also has an example for systemd timers [2]. But if your question is specifically about phones, then this might get a bit more complicated to set up.

[1] https://git.zx2c4.com/WireGuard/tree/contrib/examples/rereso...

[2] https://wiki.archlinux.org/index.php/WireGuard#Endpoint_with...


On Android the problem is the same. The Client only resolves the IP once. When the server gets a new ip, no connections can be made, although the client seem to be still connected.


I added a section on Dynamic IPs to the docs here:

https://github.com/pirate/wireguard-docs#Dynamic-IP-Allocati...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: