Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Trying to configure OpenVPN client on my Ubuntu desktop.

Conf file:

#dev-node tap0
dev tap
port 5027
secret /home/k102/Documents/27-73-74_sergeev2.key
verb 4
tun-mtu 1400
mute 10
auth MD5
cipher DES-CBC


sudo openvpn --config 27-73-74_sergeev2.ovpn

But I get this error:

Sun Feb 12 12:27:01 2012 us=30542 /sbin/ifconfig tap0 netmask mtu 1400 broadcast
SIOCSIFNETMASK: Invalid argument
Sun Feb 12 12:27:01 2012 us=36280 Linux ifconfig failed: external program exited with error status: 1
Sun Feb 12 12:27:01 2012 us=36329 Exiting

I can't figure out what I have to do with it. How can I fix this?

share|improve this question

From the OpenVPN manual:

--ifconfig l rn

Set TUN/TAP adapter parameters. l is the IP address of the local VPN endpoint. [...] For TAP devices, rn is the subnet mask of the virtual ethernet segment which is being created or connected to.
For TAP devices, which provide the ability to create virtual ethernet segments, --ifconfig is used to set an IP address and subnet mask just as a physical ethernet adapter would be similarly configured. If you are attempting to connect to a remote ethernet bridge, the IP address and subnet should be set to values which would be valid on the the bridged ethernet segment (note also that DHCP can be used for the same purpose).

You're configuring a TAP device, so the second parameter of your ifconfig directive should be a subnet mask, not an IP address.

ifconfig # or whatever mask you need
share|improve this answer
thanks! but how can i set start and end points? i mean what should i do with address? – k102 Feb 12 '12 at 9:02
I don't understand your question. Start and end points to what? – Mat Feb 12 '12 at 9:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.