[WireGuard] Using wireguard link as a proxy?

Jason A. Donenfeld Jason at zx2c4.com
Fri Jul 22 17:30:37 CEST 2016


On Fri, Jul 22, 2016 at 5:14 PM, Bruno Wolff III <bruno at wolff.to> wrote:
> On Fri, Jul 22, 2016 at 14:42:52 +0200,
> The idea I am working on now is to use policy writing and rules, so that
> packets sent to the proxy server are routed using the normal routing table
> which includes the default route supplied by dhcp, but eveything else (well
> not 127/8) uses an alternate routing table that has a default route through
> wg0. This way I can use a fixed set up and not have to parse the routing
> info setup after a wireless connection is made.
>
> I need to do some reading to get the details for creating routing tables and
> rules for picking them, but expect this will work.

1.2.3.4 is proxyserver.wireguard.io:

$ ip rule add to 1.2.3.4 lookup main pref 30
$ ip rule add to all lookup 80 pref 40
$ ip route add default dev wg0 table 80


This thread might interest you:
http://marc.info/?l=linux-netdev&m=145452157719655&w=2


More information about the WireGuard mailing list