WireGuard Archive on lore.kernel.org
 help / Atom feed
* wg-quick: Add option TableDefaultGW
@ 2018-12-29 14:13 Rene 'Renne' Bartsch, B.Sc. Informatics
  0 siblings, 0 replies; 1+ messages 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] 1+ messages in thread

only message in thread, back to index

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

WireGuard Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/wireguard/0 wireguard/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 wireguard wireguard/ https://lore.kernel.org/wireguard \
		wireguard@lists.zx2c4.com zx2c4-wireguard@archiver.kernel.org
	public-inbox-index wireguard


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/com.zx2c4.lists.wireguard


AGPL code for this site: git clone https://public-inbox.org/ public-inbox