V
V
Vadim kyklaed2018-07-26 15:42:05
linux
Vadim kyklaed, 2018-07-26 15:42:05

How to set up DNS receiving, openvpn, ubuntu 18.04?

Hello, I've been suffering all day. I can’t get dns from the openvpn server I
set it up like this I install a daemon that should parse dhcp I create a scripts folder and put the script there (the script is created automatically)
sudo mkdir -p /etc/openvpn/scripts
sudo wget https://raw.githubusercontent.com/jonathanio /updat... -P /etc/openvpn/scripts/
I give permission to the script
sudo chmod +x /etc/openvpn/scripts/update-systemd-resolved
after that I go to the openvpn user settings file and add
script-security 2 lines there
up /etc/openvpn/scripts/update-systemd-resolved
down /etc/openvpn/scripts/update-systemd-resolved
down-pre
should work but doesn't
I run it like this sudo openvpn /home/kyklaed/clien1.ovpn
connection is established but dns is not registered and remains local
# This file is managed by man:systemd-resolved(8). Don't edit.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "systemd-resolve --status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.
nameserver 127.0.0.53

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
ky0, 2018-07-26
@ky0

DHCP options are pushed from the server with the parameter dhcp-option. In your case push "dhcp-option DNS 8.8.8.8".

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question