服务器日志
Options error: Unrecognized option or missing or extra parameter(s) in server.ovpn:4: cert (2.4.9) Use --help for more information.
服务器配置
server 192.168.1.0 255.255.255.0
ifconfig-pool-persist ipp.txt
ca ca.crt
cert serverport 1194
proto udp
有人能帮忙解决这个问题吗?
dev tun
server 192.168.1.0 255.255.255.0
ifconfig-pool-persist ipp.txt
ca ca.crt
cert serverVPN.crt
key serverVPN.key
dh dh1024.pem
push "route 192.168.1.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"
comp-lzo
keepalive 10 60
ping-timer-rem
persist-tun
persist-key
client-to-client
log-append /var/log/openvpn
group daemon
daemon
verb 3.crt
key server.key
dh dh1024.pem
push "route 192.168.1.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"
comp-lzo
keepalive 10 60
ping-timer-rem
persist-tun
persist-key
client-to-client
log-append /var/log/openvpn
group daemon
daemon
verb 3
答案1
问题恰恰出在错误消息中指定的行上。
cert serverport 1194
您需要使用指令提供证书的文件名cert
,并且serverport
指令应位于下一行。
答案2
正确的服务器配置是:
端口 1194 proto udp dev tun 服务器 192.168.1.0 255.255.255.0 ifconfig-pool-persist ipp.txt ca ca.crt cert serverVPN.crt 密钥 serverVPN.key dh dh1024.pem push “路由 192.168.1.0 255.255.255.0” push “重定向网关 def1” push “dhcp-option DNS 8.8.8.8” push “dhcp-option DNS 8.8.4.4” comp-lzo keepalive 10 60 ping-timer-rem persist-tun persist-key 客户端到客户端 log-append /var/log/openvpn 组守护进程守护进程动词 3.crt 密钥 server.key dh dh1024.pem push “路由 192.168.1.0 255.255.255.0”推送“redirect-gateway def1”推送“dhcp-option DNS 8.8.8.8”推送“dhcp-option DNS 8.8.4.4”comp-lzo keepalive 10 60 ping-timer-rem persist-tun persist-key 客户端到客户端 log-append /var/log/openvpn 组守护进程守护进程动词 3