ftao / vpn-deploy-playbook

A Collection of Ansible Playbook for deploy vpn services
GNU General Public License v3.0
918 stars 159 forks source link

openconnect.yml 装完后怎么用? #25

Closed lexrus closed 9 years ago

lexrus commented 9 years ago

是要去服务器上把证书下载下来再签一个客户端证书么?

lexrus commented 9 years ago

另外,在一台 Ubuntu 14.04 上执行时遇到问题:

NOTIFIED: [ocserv | restart ocserv] ******************************************* 
failed: [05] => {"failed": true}
msg: FAILED: attempted to kill ocserv with sig SIGTERM but it wasn't running
ocserv: ERROR (already started)

FATAL: all hosts have already failed -- aborting

NOTIFIED: [ocserv | restart ocserv] ******************************************* 
FATAL: no hosts matched or all hosts have already failed -- aborting

FATAL: all hosts have already failed -- aborting

NOTIFIED: [ocserv | restart ocserv] ******************************************* 
FATAL: no hosts matched or all hosts have already failed -- aborting

FATAL: all hosts have already failed -- aborting
ftao commented 9 years ago

默认的设置应该是用户名和密码认证的。 你找个 cisco any connect 的客户端, 然后直接输入域名连接连接就好了。 如果你的服务器证书是自签名或者通过这个playbook 自动生成的话, 要在客户端允许不安全的连接。 基于证书的免密码登录还没搞。。

ftao commented 9 years ago

我实际的配置是类似这样的。 使用一个真的证书, 不是自签名。。

ocserv_use_radius: True
ocserv_radius_servers:
  - host: some.ip.of.radius
    secret: dddddd
ocserv_cert_auto: false
ocserv_cert_path: cred/some_cert.crt
ocserv_cert_key_path: cred/some_cret.key

现在代码里面只支持了基于 radius 的验证, 其他方式还没搞。。

ftao commented 9 years ago

这个报错的原因我也碰到, 是 非radius 方式, 然后也没有配置用户名, 导致 passwd 文件没有生成, 导致报错。 已经修正。

Zenuncl commented 8 years ago

刚刚实验这个问题还有,请问是什么地方出错了呢?

ftao commented 8 years ago

看了一下,之前代码似乎确实没有修正 。 重新提交了一下, 现在应该修正了。 https://github.com/ftao/vpn-deploy-playbook/commit/38be42b9e47b1191f6a23b1577462317f61f6de7