# OpenVPN error update-resolv-conf



## phalange (Jun 24, 2021)

I'm connecting using openvpn-client name.ovpn

openvpn kicks up an error

`Multiple --up scripts defined.  The previously configured script is overridden.
Options error: --up script fails with '/etc/openvpn/update-resolv-conf': No such file or directory (errno=2)
Options error: Please correct this error.
Use --help for more information.`

So I opened the ovpn file and commented out

`up /etc/openvpn/update-resolv-conf
down /etc/openvpn/update-resolv-conf`

and it connects.

Can anyone explain this error and if this solution is secure?


----------



## soulcatcher (Oct 7, 2021)

Your solution prevents openvpn client from updating DNS settings in /etc/resolv.conf that could lead to problems with name resolution.

You could change entries in name.ovpn according to the suggestions in https://forums.freebsd.org/threads/updating-dns-servers-in-openvpn-client-session.75237/

Alternatively, you can use update-resolv-conf.sh from https://github.com/graudeejs/openvpn-update-resolv-conf-freebsd, in my experience it works cleaner.

For example:

```
git clone https://github.com/graudeejs/openvpn-update-resolv-conf-freebsd.git
sudo cp update-resolv-conf.sh /usr/local/libexec/update-resolv-conf.sh
```

and then change your config entries to

`up /usr/local/libexec/update-resolv-conf.sh
down /usr/local/libexec/update-resolv-conf.sh`


----------

