'Unrecognised option or missing or extra parameter(s) in configuration: block-outside-dns' error when establishing an OpenVPN connection

I can't establish an OpenVPN connection. I use a configuration file (.ovpn) that works on my smartphone and Windows client. I pasted this configuration data into Keenetic settings but got no connection with the server. The router's logs show an error 'Unrecognized option or missing or extra parameter(s) in configuration: (line 6): block-outside-dns (2.4.6)'. What do I need to change in the OpenVPN configuration to establish a connection?


In general, the 'Unrecognised option or missing or extra parameter(s) in configuration' error in the router's logs means that there is a directive, an option, a command or a parameter in the OpenVPN configuration that is not supported by Keenetic.

Usually, after such a message, you get an error line in the log.

Let's explore the message 'Unrecognized option or missing or extra parameter(s) in configuration: (line 6): block-outside-dns (2.4.6)'.

It contains line (6) and the block-outside-dns directive.

Refer to the OpenVPN configuration. You will find the line setenv opt block-outside-dns. This directive is exclusively for Windows. In particular, it blocks the use of third-party DNS servers not explicitly mentioned in the configuration. In Android OS, this directive does not work either, and it is simply ignored.
Keenetic routers don't process this line due to strict configuration requirements.

NOTE: Important! Keenetic routers use strict OpenVPN configuration requirements. The configuration must not contain directives or unknown commands that cannot be processed.
Only the options listed in the document https://community.openvpn.net/openvpn/wiki/Openvpn24ManPage can be used in the configuration.
Some options from the link above may not be supported. For example, the Keenetic implementation of OpenVPN does not support options related to IPv6.

Faced with such an error, you need to comment out or delete the line. In our example, it is:

setenv opt block-outside-dns

To comment out, we need to start the line with a # character:

#setenv opt block-outside-dns

TIP: Tip: If there is no block-outside-dns line in the OpenVPN client configuration, but the above error is present in the router's logs, add a line to the OpenVPN configuration file:

pull-filter ignore 'block-outside-dns'

 

Was this article helpful?

50 out of 71 found this helpful