Development discussion of WireGuard
 help / color / mirror / Atom feed
From: Kalin KOZHUHAROV <me.kalin@gmail.com>
To: vtol <vtol@gmx.net>
Cc: wireguard <wireguard@lists.zx2c4.com>
Subject: Re: WG endpoint node exit to inet and DNS resolver
Date: Mon, 7 May 2018 15:26:00 +0200	[thread overview]
Message-ID: <CAKXLc7cC7V7z2GTZr4q0rM4Ju8q9e7u50OkNRCbTsoYiaSskhg@mail.gmail.com> (raw)
In-Reply-To: <c940ea93-e022-27ba-f906-783b0a7d3c1a@gmx.net>

On Mon, May 7, 2018 at 1:21 PM, =D1=BD=D2=89=E1=B6=AC=E1=B8=B3=E2=84=A0 <vt=
ol@gmx.net> wrote:
> 4.9.0-6-amd64 #1 SMP Debian 4.9.88-1 as WG endpoint node
> WG 0.0.20180420-1
> DHCP no
> Firewall off (both server and client)
> wg-quick not utilized
>
> Which DNS resolver is utilized by the clients inside a WG tunnel, the
> client's resolver or the server's? And can this be tweaked in WG?
>
There are no "clients inside a WG tunnel", only traffic inside the tunnel :=
-D
On a standard linux, this is controlled by /etc/resolv.conf whether or
not there is VPN.
/etc/resolv.conf can be (mis-)managed by dhcp clients and other daemons.
For most boxes I use dnscache running on 127.0.0.1 and I do
occasionally configure it to forward queries to another cache (so
/etc/resolv.conf is never touched).


> Clients are connecting to the endpoint node and subnets each end are
> reachable through the tunnel. The traffic to the inet from the WG however=
 is
> not escaping via the server's default route. Added the IPS's gateway node
> (81.x.x.x) to the WG iface but that did not provide inet connection for t=
he
> connected clients.
>
> Kernel IP routing table
> Destination     Gateway         Genmask         Flags Metric Ref    Use
> Iface
> 0.0.0.0         81.x.x.x    0.0.0.0         UG    0      0 0 eth0
> 81.x.x.x    0.0.0.0         255.255.255.255 UH    0      0 0 wg0
> 192.168.120.0   0.0.0.0         255.255.255.0   U     0 0        0 wg0
>
Not sure what you want to do here...
Assuming your other end of the WG tunnel is say 192.168.120.1, then
you should add it as a default gw (and it should route your packets).
ip route add default via 192.168.120.1
(no need for `dev wg0` at the end I think)

Kalin.

  parent reply	other threads:[~2018-05-07 13:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-07 11:21 ѽ҉ᶬḳ℠
     [not found] ` <CAHLp1Yk-33m1X5nkoVA7ofA8=h7uTdXP9x+DWmFzHkxAhq-g_g@mail.gmail.com>
     [not found]   ` <586e6364-d143-2b9b-8ea0-940072a9db9a@gmx.net>
2018-05-07 13:23     ` Christophe-Marie Duquesne
2018-05-07 15:19       ` ѽ҉ᶬḳ℠
2018-05-07 13:26 ` Kalin KOZHUHAROV [this message]
2018-05-07 17:43   ` ѽ҉ᶬḳ℠

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=CAKXLc7cC7V7z2GTZr4q0rM4Ju8q9e7u50OkNRCbTsoYiaSskhg@mail.gmail.com \
    --to=me.kalin@gmail.com \
    --cc=vtol@gmx.net \
    --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).