in my /etc/conf.d/openvpn PEER_DNS is set to "no", which should leave my /etc/resolv.conf alone. however, when connecting to a VPN my resolv.conf gets modified by openresolv-3.1.1. i am sure my openvpn config does not use any up/down hooks for openresolv.
create a symlink in /etc/conf.d/ for your openvpn-servicename. example: your config-file is "vpnservice.conf" in /etc/openvpn your init-file is a symlinke openvpn.vpnservice -> openvpn in /etc/conf.d your config-file should have "openvpn.vpnservice" as filename. create a symlink openvpn.vpnservice -> openvpn in /etc/conf.d and PEER_DNS will be respected for this connection
great! this works well. i recommend to describe this in the comment above PEER_DNS in /etc/conf.d/openvpn.
after some days I noticed the bad effect again. it only works when restarting the openvpn init script. unfortunately when restarting the physical network init scripts (/etc/init.d/net.eth0) my /etc/resolv.conf gets nameserver entries from my VPN.
This bug has gotten really old, can you please retry with openvpn-2.3.12 and see if the issue still exists?
no, i can't. i'm on systemd now and the original report was filed against openrc.