I am trying to run openVpn server on my router to access it's lan network remotely. I got next error when I try to run it:

daemon.err openvpn(myvpn)[7610]: Options error: --server directive network/netmask combination is invalid

Sadly but I not experienced in networking. I can't understand the exact place for vpn network interface in router, which ip/mask should I assign it. Below are my network interfaces and openvpn config (my router has public ip 46.xx.x33.118)

enter image description here

config openvpn 'myvpn'
option enabled '1'
option verb '3'
option port '1194'
option proto 'udp'
option dev 'tun'
option server '46.xx.x33.118'
option keepalive '10 120'
option ca '/etc/openvpn/ca.crt'
option cert '/etc/openvpn/my-server.crt'
option key '/etc/openvpn/my-server.key'
option dh '/etc/openvpn/dh.pem'

1 Answer 1


The "server" directive in OpenVPN is used to allocate a range of (private) IP addresses that will be given out to OpenVPN clients.

From the OpenVPN documentation:

"--server network netmask ['nopool']

A helper directive designed to simplify the configuration of OpenVPN's server mode. This directive will set up an OpenVPN server which will allocate addresses to clients out of the given network/netmask. The server itself will take the ".1" address of the given network for use as the server-side endpoint of the local TUN/TAP interface."

This address block should therefore be in a private range. In your configuration it looks like you're using your public IP address (and a much wider subnet than you actually have available). That will not work and OpenVPN rightly complains. Look at some example OpenVPN configurations. Most OpenVPN configurations use a block of 10.x.x.x addresses for handing out to clients.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .