wireguard.lists.zx2c4.com archive mirror
 help / color / mirror / Atom feed
From: "Rene 'Renne' Bartsch, B.Sc. Informatics" <ml@bartschnet.de>
To: wireguard@lists.zx2c4.com
Subject: wg-quick: Add option TableDefaultGW
Date: Sat, 29 Dec 2018 15:13:32 +0100	[thread overview]
Message-ID: <7f951f5b-eef5-9d3b-37e4-c48a5823b05f@bartschnet.de> (raw)

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

                 reply	other threads:[~2018-12-29 14:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7f951f5b-eef5-9d3b-37e4-c48a5823b05f@bartschnet.de \
    --to=ml@bartschnet.de \
    --cc=wireguard@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).