wppurking / ocserv-docker Goto Github PK
View Code? Open in Web Editor NEW用于初始化 ocserv 的 Dockfile 脚本
用于初始化 ocserv 的 Dockfile 脚本
有办法可以查看到在线人数和强制某个客户端下线吗?
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.
***
使用 FROM ubuntu:latest 时,tzdata会显示一个交互界面导致docker build中断
解决方案:
在 apt install 脚本中增加 DEBIAN_FRONTEND=noninteractive apt install -y tzdata
我用k8s创建这个container 下面是我的yaml文件:
apiVersion: v1
kind: Service
metadata:
name: ocservsv
labels:
app: ocservapp
spec:
type: NodePort
ports:
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 HUB(https://hub.docker.com/r/wppurking/ocserv/) TAG只到0.10.9,是否能更新至現在github的版本呢?謝謝。
比如用expect,但是试了一下,会报错:
time="2015-04-07T09:19:04Z" level="fatal" msg="cannot enable tty mode on non tty input"
[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]
�请教下客户端如何使用p12证书登录而不是用户名密码?
谢谢!
最近http://arukas.io这个免费的docker hosting很流行,你能否写一下在arukas.io上部署ocserv的教程?
非常感谢你
你好。我参照您在 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
目录是空的?
谢谢!
使用 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 的公网cluster 想创建这个ocserv server但是k8s 这边开两个443 和443/udp 不知道怎么搞,
证书可以不用自己生成吗?
因为软件源中的版本不够新,不支持exec参数,如何修改用户?
58.240.57.33 是南京的一个dns的地址.
https://github.com/wppurking/ocserv-docker/blob/master/ocserv/ocserv.conf#L442
这一句route = 58.0.0.0/255.0.0.0
使得使用这个dns 的用户在连接了 ocs 后, 上网不正常....
RT.因为开了几个docker 所以想问下怎么给每个docker 独立的文件,而不是共享母鸡的
昨天发现,官网infradead.org竟然打不开了!
是怎么回事啊?
~/ocserv-docker $ sudo docker logs ocserv-docker
standard_init_linux.go:178: exec user process caused "exec format error"
系统是raspbian,pi zero w
贡献者你好,发现 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)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.