Skip to content

[HowTo] udp2raw + WireGuard with network switching and dynamic IP addresses #552

@PhrozenByte

Description

@PhrozenByte

First of all: Amazing project, thank you for your great work! ❤️

I'd like to share my WireGuard + udp2raw setup that allows the client to seamlessly switch between networks (e.g. between wifi and cellular), and the server to dynamically change IP addresses. My wg-udp2raw.sh script uses WireGuard hooks to seamlessly integrate into WireGuard. The script prepares the system, starts udp2raw as Systemd service, and implements a watchdog to support network switching and dynamic IP addresses.

Since few distributions already ship udp2raw, the repository also includes a Systemd unit to start udp2raw with an unprivileged user (a dynamic user to be more precise, and the runtime environment of udp2raw is also very much locked down for improved security). The Systemd unit might also be useful for people not using udp2raw with WireGuard.

Check out https://github.com/PhrozenByte/wg-udp2raw

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions