Giter Club home page Giter Club logo

ocserv-docker's Issues

dependency issue caused by new version of ocserv

As ocserv upgraded to 0.11.0, this image cannot be successfully built due to lack of dependencies.
ocserv 升级到 0.11.0 了,docker build 在编译 ocserv 阶段由于缺乏依赖失败。

checking for LIBPROTOBUF_C... no
checking for libprotobuf-c... no
configure: WARNING: ***
*** libprotobuf-c was not found.
***
checking for libev... no
configure: error: ***
*** libev4 was not found.
***

ocserv error 2 (No such file or directory) calling stat for '/etc/ocserv/ocserv.conf

我用k8s创建这个container 下面是我的yaml文件:

apiVersion: v1
kind: Service
metadata:
name: ocservsv
labels:
app: ocservapp
spec:
type: NodePort
ports:

  • port: 443
    selector:
    app: ocservapp
    type: LoadBalancer

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pvc-ocservcontainer
labels:
app: ocservapp
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
storageClassName: azurescea

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: my-ocserv-deployment
spec:
replicas: 1
template:
metadata:
labels:
app: ocservapp
spec:
containers:
- name: ocservcontainer
image: wppurking/ocserv-docker
securityContext:
privileged: true
ports:
- containerPort: 443
name: ocservtcp443
- containerPort: 443
name: ocservudp443
protocol: UDP
volumeMounts:
- name: ocserv-persistent-storage
mountPath: /etc/ocserv
volumes:
- name: ocserv-persistent-storage
persistentVolumeClaim:
claimName: pvc-ocservcontainer

但是创建完成之后日志会提示这个错误:
net.ipv4.ip_forward = 1
ocserv error 2 (No such file or directory) calling stat for '/etc/ocserv/ocserv.conf'

docker 1.7 docker: "run" requires a minimum of 1 argument.

[root@localhost ~]# docker run -d --privileged -v ~/ocserv-docker/ocserv:/etc/ocserv -p 443:443/tcp
docker: "run" requires a minimum of 1 argument.
See 'docker run --help'.

Usage: docker run [OPTIONS] IMAGE [COMMAND] [ARG...]

Run a command in a new container

使用证书会碰到的问题

改用证书后,由于0.8.6的config文件以及本项目的config文件中的session-control = true,会导致worker进程退出。
具体参见[http://bitinn.net/11084/#comment-452257]

替换证书失败

你好。我参照您在 twitter 上的回复,按照这样的方式替换证书,但是执行了这句命令后,启动container失败。

docker run -d --privileged -v ~/ocserv-docker/ocserv:/etc/ocserv -v ~/ocserv-docker/ssl:/opt/certs -p 5677:5677/tcp wppurking/ocserv

~/ocserv-docker/ssl 目录下存放的是我自己的SSL证书。

如果移除 ssl 证书挂载,则可以成功启动 container

还有,想请教下,为什么我进入 container 后,无法找到 ocserv.conf 这个文件,我的 container 内的/etc/ocserv目录是空的?

谢谢!

ocserv.conf 文件错误, 导致 mac 客户端连接不上. 提示配置错误 The VPN configuration received from the secure gateway is invalid

使用 mac 上的 any connect 4.0 报错 The VPN configuration received from the secure gateway is invalid.
原因是
ocserv.conf 中间第 444 以及 445 行 格式不对
https://github.com/wppurking/ocserv-docker/blob/master/ocserv/ocserv.conf#L444
https://github.com/wppurking/ocserv-docker/blob/master/ocserv/ocserv.conf#L445
应该是
route = 60.0.0.0/255.0.0.0
route = 63.0.0.0/255.0.0.0

修改之后就不报错了.

English translation:

On Mac, any connect 4.0 shows the error 'The VPN configuration received from the secure gateway is invalid'
It results from a bug in the ocserv.conf.
The route rules on line 444 and 445 in file ocserv.conf are misspelled.
It should be
route = 60.0.0.0/255.0.0.0
route = 63.0.0.0/255.0.0.0

After the modification, the error disappears.

能否写一个在K8S 上部署的yaml

我这边有一个k8s 的公网cluster 想创建这个ocserv server但是k8s 这边开两个443 和443/udp 不知道怎么搞,

证书可以不用自己生成吗?

gnutls库版本过低

贡献者你好,发现 Dockerfile 在构建时会报如下错误:

checking for LIBNETTLE... yes
checking for LIBGNUTLS... no
configure: error: Package requirements (gnutls >= 3.3.0) were not met:

Requested 'gnutls >= 3.3.0' but version of GnuTLS is 3.2.11
You may find new versions of GnuTLS at http://www.gnutls.org/

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables LIBGNUTLS_CFLAGS
and LIBGNUTLS_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

应该是新版本的 ocserv 要求了更高版本的 GnuTLs 导致的. ubuntu:trusty 的 apt 提供的GnuTLs版本是2.9.x

把使用的 ubuuntu 镜像换成 latest 就可以正常构建了(version 3.6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.