Versions Compared

Key

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

...

To ignore the server's redirect-gateway directive, add the following to the client's ovpn config file:

Code Block
--pull-filter ignore redirect-gateway

...

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

Code Block
languagebash
# override DNS with my own settings
pull-filter ignore "dhcp-option DNS"
# don't block other DNS servers (for windows clients)
pull-filter ignore "block-outside-dns"

# set own DNS servers (optional)
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.

Honour DNS config pushed from server on Arch Linux client

On a few of my Arch (and Manjaro) machines, they weren't using DNS configs being pushed from the OpenVPN server.

As outlined in on the Arch Wiki, I needed to add the following to my client config (.ovpn):

Code Block
script-security 2
up /etc/openvpn/update-resolv-conf
down /etc/openvpn/update-resolv-conf

If OpenVPN doesn't reconnect after wake

...

  1. https://www.digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-ubuntu-16-04
  2. https://community.openvpn.net/openvpn/wiki/IgnoreRedirectGateway
  3. https://wiki.archlinux.org/index.php/OpenVPN#The_update-resolv-conf_custom_script

Content by Label
showLabelsfalse
max5
spacesTKB
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel in ("openvpn","ip-address") and type = "page" and space = "TKB"
labelsopenvpn ip-address

...