OpenVPN – fix issues with DNS server assignment (Synology NAS)

Synology NAS systems are great VPN servers for a home or small office. However if you want to connect to the VPN and route all your traffic through the VPN and be able to browse the internet there are a few things you need to change on the Synology server.

Theoretically you should be able to set these options on the client, but I have not managed to get this to work with Synology and judging by the amount of forum threads a lot of other people had the same problem. If somebody has a better way to fix this I would love to know. I don’t like to manually change these config files as I assume they will be overwritten when making changes to the web-interface.

vi /usr/syno/etc/packages/VPNCenter/openvpn/openvpn.conf

add the following lines.

push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 8.8.4.4"
push "dhcp-option DNS 8.8.8.8"

Please note that the DNS option are Google’s public DNS servers as an example, you probably want to use your ISP’s (the one hosting the Synology server that is) DNS IP’s instead.

Please note that this was tested with Synology DSM version 5.2 only and Ubuntu & Android as the main client OS. Please leave comment for other combinations.

Author: Leo Gaggl

ict business owner specialising in mobile learning systems. interests: sustainability, internet of things, ict for development, open innovation, agriculture

One thought on “OpenVPN – fix issues with DNS server assignment (Synology NAS)”

  1. Great post! I had no internet and internal domain name resolution, because openvpn used the wrong DNS server.

Leave a Reply