我按照以下指南如何在Ubuntu 16.04上安装和安装oepnvpn
当我使用以下命令启动openVPN服务器时:service openvpn start
看起来已经启动,但是即使激活了log选项,也没有写入任何日志文件。
status /var/log/openvpn-status.log
log /var/log/openvpn.log
有什么提示可以尝试吗?
- 如何检查流程/服务是否真的在运行?
- 如何确定服务是否每次都崩溃?
- 知道为什么日志文件不写吗?
启动服务时输出
root@Diabolo:/etc/openvpn# service openvpn stop
root@Diabolo:/etc/openvpn# service openvpn start
root@Diabolo:/etc/openvpn# service openvpn status
openvpn.service - OpenVPN service
Loaded: loaded (/lib/systemd/system/openvpn.service; enabled; vendor preset: enabled)
Active: active (exited) since Sat 2016-06-25 19:04:12 CEST; 3s ago
Process: 3956 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
Main PID: 3956 (code=exited, status=0/SUCCESS)
Jun 25 19:04:12 Diabolo systemd[1]: Starting OpenVPN service...
Jun 25 19:04:12 Diabolo systemd[1]: Started OpenVPN service.
在系统日志上输出
Jun 25 19:04:12 Diabolo systemd[1]: Starting OpenVPN service...
Jun 25 19:04:12 Diabolo systemd[1]: Started OpenVPN service.
配置文件server.conf
port 1194
proto udp
dev tun
ca /etc/openvpn/ca.crt
cert /etc/openvpn/server.crt
key /etc/openvpn/server.key
dh /etc/openvpn/dh2048.pem
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 208.67.222.222"
push "dhcp-option DNS 208.67.220.220"
keepalive 10 120
comp-lzo
max-clients 100
user nobody
group nogroup
persist-key
persist-tun
status /var/log/openvpn-status.log
log /var/log/openvpn.log
verb 3