wireguard.lists.zx2c4.com archive mirror
 help / color / mirror / Atom feed
* wg-quick: Add option TableDefaultGW
@ 2018-12-29 14:13 Rene 'Renne' Bartsch, B.Sc. Informatics
  0 siblings, 0 replies; only message in thread
From: Rene 'Renne' Bartsch, B.Sc. Informatics @ 2018-12-29 14:13 UTC (permalink / raw)
  To: wireguard

Hi,

We're in the situation in which we want to use the default routing table but need another routing table
for a policy-based routing of public static IP-Adresses with a wireguard default gateway in the VPN.
"Table <uint|name>" is no option as it would create all routes in the new table.

My current idea is to use

PostUp =  wg set %i peer <pubkey> allowed-ips ::/0, 0.0.0.0/0
PostUp =  ip -4 route add default dev %i table <uint|name>"
PostUp =  ip -6 route add default dev %i table <uint|name>"
PreDown = ip -4 route del default dev %i table <uint|name>"
PreDown = ip -6 route del default dev %i table <uint|name>"

and use "ip rule"-statements in PostUp/PreDown.

To simplify such a VPN setup with a default gateway I suggest a wg-quick option "TableDefaultGW <uint|name>"
which adds a routing table for the default gateway only.

Regards,

Renne
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-12-29 14:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-29 14:13 wg-quick: Add option TableDefaultGW Rene 'Renne' Bartsch, B.Sc. Informatics

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).