Package: openvpn
Version: 2.4.0-6+deb9u1
Severity: normal
File: /etc/openvpn/update-resolv-conf

Dear Maintainer,

-- System Information:
Debian Release: 9.1
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8),
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages openvpn depends on:
ii  debconf [debconf-2.0]  1.5.61
ii  init-system-helpers    1.48
ii  iproute2               4.9.0-1
ii  libc6                  2.24-11+deb9u1
ii  liblz4-1               0.0~r131-2+b1
ii  liblzo2-2              2.08-1.2+b2
ii  libpam0g               1.1.8-3.6
ii  libpkcs11-helper1      1.21-1
ii  libssl1.0.2            1.0.2l-2
ii  libsystemd0            232-25+deb9u1
ii  lsb-base               9.20161125

Versions of packages openvpn recommends:
ii  easy-rsa  2.2.2-2

Versions of packages openvpn suggests:
ii  openssl     1.1.0f-3
ii  resolvconf  1.79

-- Configuration Files:
/etc/default/openvpn changed:
AUTOSTART="none"
OPTARGS=""
OMIT_SENDSIGS=0


-- debconf information excluded


    * What led up to the situation?
Added 'dhcp-option DNS x.x.x.x' to my openvpn's server.conf but my
Debian client could not get the DNS.
   * What exactly did you do (or not do) that was effective (or
     ineffective)?
After that I added the lines "up /etc/openvpn/update-resolv-conf' and
'down /etc/openvpn/update-resonv-conf' to my client.conf but it still
did not work.

I expected after this actions my /etc/resolv.conf file to be changed and
have the DNS I had provided in my openvpn's server.conf 'dhcp-option'.

Two, stupid solutions worked for me.

One, I added a second line 'push dhcp-option DNS x.x.x.x' under the
first one and then the script parsed it correctly and all worked as
expected.

Two, I added a '\n' to the script because /etc/resolvconf needs "Each
line in the file must be terminated by a newline".

So when the command   
>> echo -n "$R" | /sbin/resolvconf -a "${dev}.openvpn"
executes resolvconf does not parse it correcty as it does not end in a
newline.
For this I changed "$R" to "$R\n" and it worked(on this senario my
server.conf had only one 'push dhcp-option DNS x.x.x.x")
(It also worked and pushed correctly 2 diffrent dhcp-options in this
senario, because I thought that maybe my solution would break adding
more dhcp-option, but it looks like it does not.)

I don't know if adding a "\n" could be a good solution.

Please inform me about the output of this bug report.

Thanks in advance,
Iliana.

-- 
Iliana Panagopoulou
Systems Administrator, CENSUS S.A
[email protected] | www.census-labs.com

Reply via email to