Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info

You DO NOT need to restart the openvpn server after adding client configs. Each time a client connects openvpn will check for a corresponding (named) file in the ccd folder.

Overriding DNS settings for server in client configutation

Openvpn server.conf  allows you to define DNS addresses such as addresses for OpenDNS etc.  These addresses with then be pushed to the client to implement when it connects to the server.

However, you might want/need to use different DNS servers for your client.  This can be done easily by rejecting the server's pushed DNS addresses and implementing your own directly in your .ovpn config file.

Add the following to you .ovpn config (replacing x.x.x.x  and y.y.y.y  with your preferred DNS addresses).

Code Block
# override DNS with my own settings
pull-filter ignore "dhcp-option DNS"
dhcp-option DNS x.x.x.x
dhcp-option DNS y.y.y.y


Warning

Replace x.x.x.x  and y.y.y.y  with your preferred DNS addresses above.

Recovering after an accidental ./clean-all

...