2

I'm using Network Manager (1.18.0-1) on the Arch Linux system where resolvconf is also present (from openresolv which is a base package netctl dependecy).

When I'm connecting to the VPN server via NetworkManager I'm experiencing an issue with lasting DNS record after disconnecting the VPN. I partially found why:

  1. after connection the NetworkManager process includes VPN nameserver in the resolv.conf
  2. regarding to /etc/ppp/ip-up.d/00-dns.sh (below) and valid USEPEERDNS=1 the resolvconf is called; it will make backup of the resolv.conf and replace with own nameserver record
  3. after VPN disconnecting /etc/ppp/ip-down.d/00-dns.sh calls resolvconf to delete the nameserver record and recover the resolv.conf from resolv.conf.bak where is (at this time) unreachable nameserver record

The dirty hotfix is to disable /etc/ppp/ip-up.d/00-dns.sh (or just comment-out the /usr/bin/resolvconf ... line). I don't want to uninstall openresolv because it will break a netctl dependency and I want this base package too.

Since NetworkManager is not a "stock" networking tool in Arch Linux I'm not sure if this is a kind of bug or what settings am I missing. What would be a correct way how to solve it?

/etc/ppp/ip-up.d/00-dns.sh:

#!/bin/sh

if [ "$USEPEERDNS" = "1" -a -f /etc/ppp/resolv.conf ]; then
  if [ -x /usr/bin/resolvconf ]; then
    /usr/bin/resolvconf -a ${IFNAME} </etc/ppp/resolv.conf
  else
    [ -e /etc/resolv.conf ] && mv /etc/resolv.conf /etc/resolv.conf.backup.${IFNAME}
    mv /etc/ppp/resolv.conf /etc/resolv.conf
    chmod 644 /etc/resolv.conf
  fi
fi
1
  • Interesting, 20 days and nothing ... with more points I'd start a bounty
    – dmnc
    Jul 18, 2019 at 21:37

0

You must log in to answer this question.

Browse other questions tagged .