You are not logged in.

#1 2017-05-24 06:07:07

john-soda
Member
Registered: 2017-05-20
Posts: 14

[SOLVED] Prevent DNS leak with update-systemd-resolved not working

After I read this statement

However if you have systemd 229 or newer the better option is to use script from https://github.com/jonathanio/update-systemd-resolved which uses DBus calls instead of creating temporary *.network files.

here
I tried to prevent DNS leaking with the update-systemd-resolved script, but I don't get it to work.
My DNS is always leaking.

I installed updated-systemd-resolved via AUR,  the

systemd-resolved.service

is enabled
and I modified my

/etc/nsswitch.conf

with this line

# Don't use /etc/resolv.conf at all
hosts: files resolve myhostname

and added following lines to my openvpn client file

script-security 2
setenv PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
up /etc/openvpn/update-systemd-resolved
down /etc/openvpn/update-systemd-resolved
down-pre

When I check the status of  systemd-resolved.service  after I started openvpn
I see

systemd-resolved[535]: Switching to DNS server XXX.XXX.XX.X for interface tun0.

  with XXX is the IP pushed from the openvpn server.

But when I do a DNS Leaktest, my DNS is always leaking!
Some help would be really appreciated!

Last edited by john-soda (2017-05-30 09:58:15)

Offline

#2 2017-05-30 01:55:05

john-soda
Member
Registered: 2017-05-20
Posts: 14

Re: [SOLVED] Prevent DNS leak with update-systemd-resolved not working

When I add this line in my openvpn client config

 dhcp-option DOMAIN-ROUTE .

it works!

See: Github issue

Offline

#3 2017-05-30 02:08:44

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Prevent DNS leak with update-systemd-resolved not working

Cool. Please remember to mark your thread as [Solved] by editing your first post and prepending it to the title.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#4 2018-04-13 14:34:38

dmitryb
Member
Registered: 2017-02-11
Posts: 5

Re: [SOLVED] Prevent DNS leak with update-systemd-resolved not working

john-soda wrote:

When I add this line in my openvpn client config

 dhcp-option DOMAIN-ROUTE .

it works!

See: Github issue

Thanks a lot for posting the solution! It works smile

Offline

#5 2018-04-13 14:53:04

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] Prevent DNS leak with update-systemd-resolved not working

@dmitryb

Please take the time to familiarise yourself with the forum Code of Conduct, especially the sections regarding necro-bumping and empty posts.

Closing this old thread.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

Board footer

Powered by FluxBB