Page 1 of 1

Centos 6.4 openvz installation error

Posted: Sat Oct 19, 2013 1:08 pm
by hruin
Hi, I have 128MB RAM + 128MB vswap VPS with reprisehosting.

I tried install openvpn following this instruction :

http://www.servermom.com/how-to-build-o ... s-6-x/732/

However, when I try to run it it says

Code: Select all

[root@volibear dev]# service openvpn start
Starting openvpn: Usage: ip link add link DEV [ name ] NAME
                   [ txqueuelen PACKETS ]
                   [ address LLADDR ]
                   [ broadcast LLADDR ]
                   [ mtu MTU ]
                   type TYPE [ ARGS ]
       ip link delete DEV type TYPE [ ARGS ]

       ip link set DEVICE [ { up | down } ]
	                  [ arp { on | off } ]
	                  [ dynamic { on | off } ]
	                  [ multicast { on | off } ]
	                  [ allmulticast { on | off } ]
	                  [ promisc { on | off } ]
	                  [ trailers { on | off } ]
	                  [ txqueuelen PACKETS ]
	                  [ name NEWNAME ]
	                  [ address LLADDR ]
	                  [ broadcast LLADDR ]
	                  [ mtu MTU ]
	                  [ netns PID ]
			  [ alias NAME ]
	                  [ vf NUM [ mac LLADDR ]
				   [ vlan VLANID [ qos VLAN-QOS ] ]
				   [ rate TXRATE ] ] 
       ip link show [ DEVICE ]

TYPE := { vlan | veth | vcan | dummy | ifb | macvlan | can }
                                                           [FAILED]
and the log said this

Code: Select all

Oct 19 08:39:46 volibear openvpn[1348]: OpenVPN 2.2.2 x86_64-unknown-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] [eurephia] built on Apr  5 2012
Oct 19 08:39:46 volibear openvpn[1348]: NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Oct 19 08:39:46 volibear openvpn[1348]: PLUGIN_INIT: POST /usr/share/openvpn/plugin/lib/openvpn-auth-pam.so '[/usr/share/openvpn/plugin/lib/openvpn-auth-pam.so] [/etc/pam.d/login]' intercepted=PLUGIN_AUTH_USER_PASS_VERIFY 
Oct 19 08:39:46 volibear openvpn[1348]: Diffie-Hellman initialized with 1024 bit key
Oct 19 08:39:46 volibear openvpn[1348]: WARNING: POTENTIALLY DANGEROUS OPTION --client-cert-not-required may accept clients which do not present a certificate
Oct 19 08:39:46 volibear openvpn[1348]: TLS-Auth MTU parms [ L:1576 D:140 EF:40 EB:0 ET:0 EL:0 ]
Oct 19 08:39:46 volibear openvpn[1348]: Socket Buffers: R=[87380->131072] S=[16384->131072]
Oct 19 08:39:46 volibear openvpn[1348]: ROUTE: default_gateway=UNDEF
Oct 19 08:39:46 volibear openvpn[1348]: Note: Cannot open TUN/TAP dev /dev/net/tun: Operation not permitted (errno=1)
Oct 19 08:39:46 volibear openvpn[1348]: /sbin/ip link set dev  up mtu 1500
Oct 19 08:39:46 volibear openvpn[1348]: Linux ip link set failed: external program exited with error status: 255
Oct 19 08:39:46 volibear openvpn[1348]: Exiting
I think openvpn[1348]: Note: Cannot open TUN/TAP dev /dev/net/tun: Operation not permitted (errno=1)
openvpn[1348]: /sbin/ip link set dev up mtu 1500
openvpn[1348]: Linux ip link set failed: external program exited with error status: 255

those parts require to be solved.

In addition, when I typed "cat /dev/net/tun", it returns "cat: /dev/net/tun: File descriptor in bad state
"
I read many guides said that means my tun is enabled correctly.

What should I have to more?
Should I contact server owner again to do something else?

Re: Centos 6.4 openvz installation error

Posted: Sat Oct 19, 2013 1:25 pm
by hruin
Here's my server.conf

Code: Select all

port 443 #- port
proto tcp #- protocol
dev tun
tun-mtu 1500
tun-mtu-extra 32
mssfix 1450
reneg-sec 0
ca /etc/openvpn/easy-rsa/2.0/keys/ca.crt
cert /etc/openvpn/easy-rsa/2.0/keys/server.crt
key /etc/openvpn/easy-rsa/2.0/keys/server.key
dh /etc/openvpn/easy-rsa/2.0/keys/dh1024.pem
plugin /usr/share/openvpn/plugin/lib/openvpn-auth-pam.so /etc/pam.d/login #- Comment this line if you are using FreeRADIUS
#plugin /etc/openvpn/radiusplugin.so /etc/openvpn/radiusplugin.cnf #- Uncomment this line if you are using FreeRADIUS
client-cert-not-required
username-as-common-name
server 10.8.0.0 255.255.255.0
push "redirect-gateway def1"
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
keepalive 5 30
comp-lzo
persist-key
persist-tun
status 1194.log
verb 3