Category: OpenVPN

Synology DSM4.x change OpenVpn Server default port and protocol

The OpenVPN GUI configuration of my DS209 and DS109 has limited options. For instance, it is not possible to change the port and protocol, but we can manually modify its configuration file. My purposes is to change the port from 1194 to 1199 and the protocol from UDP to TCP.

Mainly everything is located here: /usr/syno/etc/packages/VPNCenter/openvpn, there is the configuration file and the keys folder.

OpenĀ openvpn.conf and

  • to change the default port add the line “port <n>” where <n> is the port number
  • to change the default protocol UDP to TCP add the line “proto tcp

Here is my configuration:

DS109> cat /usr/syno/etc/packages/VPNCenter/openvpn/openvpn.conf
push "route"
push "route"

dev tun

#these two are manually added
port 1199
proto tcp

management 1195


dh /var/packages/VPNCenter/target/etc/openvpn/keys/dh1024.pem
ca /var/packages/VPNCenter/target/etc/openvpn/keys/ca.crt
cert /var/packages/VPNCenter/target/etc/openvpn/keys/server.crt
key /var/packages/VPNCenter/target/etc/openvpn/keys/server.key

max-clients 3


verb 3

#log-append /var/log/openvpn.log

keepalive 10 60
reneg-sec 0

plugin /var/packages/VPNCenter/target/lib/ /var/packages/VPNCenter/target/etc/openvpn/radiusplugin.cnf 

You can now restart the OpenVPN server using the DSM GUI or manually as follows. Verify where the script is located, in fact on previous versions of Synology DSMs the command was completely different (

DS109> find . -name

stop and start again the OpenVpn server

DS109> ./volume1/@appstore/VPNCenter/scripts/ stop
Stopping openvpn ...
Stopping FreeRADIUS: radiusd.

DS109> ./volume1/@appstore/VPNCenter/scripts/ start
Starting FreeRADIUS:radiusd
Starting openvpn ...
Fri Mar 15 12:13:10 2013 RADIUS-PLUGIN: Configfile name: /var/packages/VPNCenter/target/etc/openvpn/radiusplugin.cnf.
DS109> Fri Mar 15 12:13:13 2013 RADIUS-PLUGIN: No attributes Acct Interim Interval or bad length.
Fri Mar 15 12:13:13 2013 RADIUS-PLUGIN: Client config file was not written, overwriteccfiles is false

Enjoy now your VPN


WordPress Themes