wireguard: add a custom routing table for peers

commit 43867c1e070fc96420a666b0bb21182eff16787b
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Sun Apr 27 18:30:59 2025 +0200

    wireguard: Add a custom routing table for peers

    This is a dirty hack to make connections to VPN providers actually work.

    We mark all WG packets after encryption and use a secondary routing
    table to look up any routes to the peers. That way, we can replace the
    default route in the main routing table without having to care about the
    special routes there.

    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
This commit is contained in:
Vincent Li
2025-06-24 22:37:17 -07:00
parent 5b18e6c763
commit 457c79518d

View File

@@ -78,6 +78,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
# Add table for static routing
echo "200 static" >> /etc/iproute2/rt_tables
echo "201 wg" >> /etc/iproute2/rt_tables
@rm -rf $(DIR_APP)
@$(POSTBUILD)