Hello, I recently tried installing Openvpn on a Centos 6.3 64 bits box but it is not working, I set everything up but when I try to initialize the service I get:
Starting openvpn: [FAILED]
I check the openvpn.log for any clue about why it might not be starting but it says that the initialization process is being completed. Here's the log
Mon Nov 12 15:59:11 2012 us=217552 event_wait : Interrupted system call (code=4)
Mon Nov 12 15:59:11 2012 us=217932 TCP/UDP: Closing socket
Mon Nov 12 15:59:11 2012 us=218016 /sbin/ip route del 10.8.34.0/24
RTNETLINK answers: Operation not permitted
Mon Nov 12 15:59:11 2012 us=220474 ERROR: Linux route delete command failed: external program exited with error status: 2
Mon Nov 12 15:59:11 2012 us=220519 Closing TUN/TAP interface
Mon Nov 12 15:59:11 2012 us=220551 /sbin/ip addr del dev tun0 local 10.8.34.1 peer 10.8.34.2
RTNETLINK answers: Operation not permitted
Mon Nov 12 15:59:11 2012 us=222784 Linux ip addr del failed: external program exited with error status: 2
Mon Nov 12 15:59:11 2012 us=225406 SIGTERM[hard,] received, process exiting
Mon Nov 12 15:59:13 2012 us=249016 Current Parameter Settings:
Mon Nov 12 15:59:13 2012 us=249145 config = 'server.conf'
Mon Nov 12 15:59:13 2012 us=249165 mode = 1
Mon Nov 12 15:59:13 2012 us=249181 persist_config = DISABLED
Mon Nov 12 15:59:13 2012 us=249196 persist_mode = 1
Mon Nov 12 15:59:13 2012 us=249212 show_ciphers = DISABLED
Mon Nov 12 15:59:13 2012 us=249227 show_digests = DISABLED
Mon Nov 12 15:59:13 2012 us=249241 show_engines = DISABLED
Mon Nov 12 15:59:13 2012 us=249257 genkey = DISABLED
Mon Nov 12 15:59:13 2012 us=249272 key_pass_file = '[UNDEF]'
Mon Nov 12 15:59:13 2012 us=249287 show_tls_ciphers = DISABLED
Mon Nov 12 15:59:13 2012 us=249303 Connection profiles [default]:
Mon Nov 12 15:59:13 2012 us=249319 proto = udp
Mon Nov 12 15:59:13 2012 us=249334 local = 'mywanaddress'
Mon Nov 12 15:59:13 2012 us=249350 local_port = 1194
Mon Nov 12 15:59:13 2012 us=249365 remote = '[UNDEF]'
Mon Nov 12 15:59:13 2012 us=249380 remote_port = 1194
Mon Nov 12 15:59:13 2012 us=249395 remote_float = DISABLED
Mon Nov 12 15:59:13 2012 us=249410 bind_defined = DISABLED
Mon Nov 12 15:59:13 2012 us=249425 bind_local = ENABLED
Mon Nov 12 15:59:13 2012 us=249454 NOTE: --mute triggered...
Mon Nov 12 15:59:13 2012 us=249483 252 variation(s) on previous 20 message(s) suppressed by --mute
Mon Nov 12 15:59:13 2012 us=249502 OpenVPN 2.2.2 x86_64-unknown-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] [eurephia] built on Apr 5 2012
Mon Nov 12 15:59:13 2012 us=249726 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Mon Nov 12 15:59:13 2012 us=253013 Diffie-Hellman initialized with 1024 bit key
Mon Nov 12 15:59:13 2012 us=254121 Control Channel Authentication: using '/etc/openvpn/easy-rsa/2.0/keys/ta.key' as a OpenVPN static key file
Mon Nov 12 15:59:13 2012 us=254157 Outgoing Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Mon Nov 12 15:59:13 2012 us=254178 Incoming Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Mon Nov 12 15:59:13 2012 us=254205 TLS-Auth MTU parms [ L:1558 D:166 EF:66 EB:0 ET:0 EL:0 ]
Mon Nov 12 15:59:13 2012 us=254245 Socket Buffers: R=[229376->131072] S=[229376->131072]
Mon Nov 12 15:59:13 2012 us=254423 ROUTE default_gateway=mywangateway
Mon Nov 12 15:59:13 2012 us=255171 TUN/TAP device tun0 opened
Mon Nov 12 15:59:13 2012 us=255213 TUN/TAP TX queue length set to 100
Mon Nov 12 15:59:13 2012 us=255262 /sbin/ip link set dev tun0 up mtu 1500
Mon Nov 12 15:59:13 2012 us=257900 /sbin/ip addr add dev tun0 local 10.8.34.1 peer 10.8.34.2
Mon Nov 12 15:59:13 2012 us=261595 /sbin/ip route add 10.8.34.0/24 via 10.8.34.2
Mon Nov 12 15:59:13 2012 us=267201 Data Channel MTU parms [ L:1558 D:1450 EF:58 EB:135 ET:0 EL:0 AF:3/1 ]
Mon Nov 12 15:59:13 2012 us=272789 GID set to nobody
Mon Nov 12 15:59:13 2012 us=272904 UID set to nobody
Mon Nov 12 15:59:13 2012 us=272958 UDPv4 link local (bound): mywanaddress:1194
Mon Nov 12 15:59:13 2012 us=272977 UDPv4 link remote: [undef]
Mon Nov 12 15:59:13 2012 us=273003 MULTI: multi_init called, r=256 v=256
Mon Nov 12 15:59:13 2012 us=276128 IFCONFIG POOL: base=10.8.34.4 size=62
Mon Nov 12 15:59:13 2012 us=276172 IFCONFIG POOL LIST
Mon Nov 12 15:59:13 2012 us=276223 Initialization Sequence Completed
I have checked my configuration tons of times but I don't know what might be failing, I have all the keys and according to the log everything is working but the service actually isn't working. when I issue a netstat -a command this is what it shows
netstat --listening
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 *:46918 *:* LISTEN
tcp 0 0 *:sunrpc *:* LISTEN
tcp 0 0 *:ssh *:* LISTEN
tcp 0 0 localhost:ipp *:* LISTEN
tcp 0 0 *:57737 *:* LISTEN
tcp 0 0 *:sunrpc *:* LISTEN
tcp 0 0 *:ssh *:* LISTEN
tcp 0 0 localhost:ipp *:* LISTEN
but I don't see the openvpn port here.
This is my server config
local mywanaddress
proto udp
dev tun
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 # This file should be kept secret
dh /etc/openvpn/easy-rsa/2.0/keys/dh1024.pem
server 10.8.34.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "route mylansubnet 255.255.255.0"
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS mydns1"
push "dhcp-option DNS mydns2"
client-to-client
keepalive 10 120
tls-auth /etc/openvpn/easy-rsa/2.0/keys/ta.key 0 # This file is secret
cipher AES-256-CBC # AES
comp-lzo
max-clients 10
user nobody
group nobody
persist-key
persist-tun
status openvpn-status.log
log-append openvpn.log
verb 6
mute 20
I hope you can help me.