Hey everyone,
I have to .conf file in OpenVPN folder so I can have 2 Daemons to listen to different ports on the same VM. But I found OpenVPN are not started automatically at boot, I have to manually start OpenVPN service manually after server is up.
I tried chkconfi:
chkconfig openvpn on
As we as upstart script:
start on runlevel [345]
stop on starting shutdown
script
sudo service openvpn start
end script
But none of them worked.
I have checked log files, but I am not sure what should I do next:
Jun 16 02:38:12 undead005 openvpn[1834]: /sbin/route del -net 10.8.0.0 netmask 255.255.255.0
Jun 16 02:38:12 undead005 openvpn[1847]: [b]event_wait : Interrupted system call (code=4)[/b]
Jun 16 02:38:12 undead005 openvpn[1847]: /sbin/route del -net 10.7.0.0 netmask 255.255.255.0
Jun 16 02:38:12 undead005 openvpn[1847]: Closing TUN/TAP interface
Jun 16 02:38:12 undead005 openvpn[1847]: /sbin/ifconfig tun1 0.0.0.0
Jun 16 02:38:12 undead005 openvpn[1834]: Closing TUN/TAP interface
Jun 16 02:38:12 undead005 openvpn[1834]: /sbin/ifconfig tun0 0.0.0.0
Jun 16 02:38:12 undead005 openvpn[1834]: SIGTERM[hard,] received, process exiting
Jun 16 02:38:12 undead005 openvpn[1847]: SIGTERM[hard,] received, process exiting
Jun 16 02:38:50 undead005 openvpn[1107]: [b]Options error: --status fails with 'openvpntcp.log': Permission denied[/b]
Jun 16 02:38:50 undead005 openvpn[1107]: Options error: Please correct these errors.
Jun 16 02:38:50 undead005 openvpn[1107]: Use --help for more information.
Jun 16 02:38:50 undead005 openvpn[1110]: [b]Options error: --status fails with 'openvpnudp.log': Permission denied[/b]
Jun 16 02:38:50 undead005 openvpn[1110]: [b]Options error: Please correct these errors.[/b]
Jun 16 02:38:50 undead005 openvpn[1110]: Use --help for more information.
Here is my server.conf
port 443
proto udp
dev tun
scramble obfuscate xxx
ca /etc/openvpn/ca.crt
cert /etc/openvpn/xxxserver.crt
key /etc/openvpn/xxxserver.key
tls-auth /etc/openvpn/ta.key 0
dh /etc/openvpn/dh1024.pem
server 10.7.0.0 255.255.255.0
cipher AES-256-CBC
comp-lzo
persist-key
persist-tun
status openvpnudp.log
verb 3
duplicate-cn
mssfix 1300
push "redirect-gateway def1"
push "dhcp-option DNS 208.67.222.222"
push "dhcp-option DNS 8.8.4.4"
keepalive 5 30