V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  zeng0730  ›  全部回复第 1 页 / 共 1 页
回复总数  15
这是我的配置,在默认配置的基础上修改

注释掉以下行

auth = "plain[./sample.passwd]"
route = 192.168.1.0/255.255.255.0
route = 192.168.5.0/255.255.255.0


去掉以下行注释

#auth = "plain[/etc/ocserv/ocpasswd]"
#output-buffer = 10

修改以下行

原设置
max-clients = 16
max-same-clients = 2
server-cert = ../tests/server-cert.pem
server-key = ../tests/server-key.pem
ipv4-network = 192.168.1.0
ipv4-netmask = 255.255.255.0
dns = 192.168.1.2

修改后
max-clients = 1024
max-same-clients = 10
server-cert = /etc/ocserv/server.crt
server-key = /etc/ocserv/server.key
ipv4-network = 10.0.0.0
ipv4-netmask = 255.255.0.0
dns = 8.8.8.8
dns = 8.8.4.4

添加以下行

route = 101.0.0.0/255.0.0.0
route = 107.0.0.0/255.0.0.0
route = 109.0.0.0/255.0.0.0
route = 117.0.0.0/255.0.0.0
route = 125.0.0.0/255.0.0.0
route = 128.0.0.0/255.0.0.0
route = 141.0.0.0/255.0.0.0
route = 168.0.0.0/255.0.0.0
route = 170.0.0.0/255.0.0.0
route = 173.0.0.0/255.0.0.0
route = 174.0.0.0/255.0.0.0
route = 176.0.0.0/255.0.0.0
route = 190.0.0.0/255.0.0.0
route = 192.0.0.0/255.0.0.0
route = 198.0.0.0/255.0.0.0
route = 199.0.0.0/255.0.0.0
route = 205.0.0.0/255.0.0.0
route = 206.0.0.0/255.0.0.0
route = 208.0.0.0/255.0.0.0
route = 210.0.0.0/255.0.0.0
route = 216.0.0.0/255.0.0.0
route = 220.0.0.0/255.0.0.0
route = 50.0.0.0/255.0.0.0
route = 54.0.0.0/255.0.0.0
route = 59.0.0.0/255.0.0.0
route = 61.244.0.0/255.255.0.0
route = 63.0.0.0/255.0.0.0
route = 66.0.0.0/255.0.0.0
route = 69.0.0.0/255.0.0.0
route = 72.0.0.0/255.0.0.0
route = 73.0.0.0/255.0.0.0
route = 74.0.0.0/255.0.0.0
route = 78.0.0.0/255.0.0.0
route = 8.0.0.0/255.0.0.0
route = 92.0.0.0/255.0.0.0
route = 92.0.0.0/255.0.0.0
route = 93.0.0.0/255.0.0.0
route = 93.0.0.0/255.0.0.0
route = 96.0.0.0/255.0.0.0
route = 97.0.0.0/255.0.0.0
这只是证书那段
我的是这样

server-cert = /etc/ocserv/server.crt
server-key = /etc/ocserv/server.key

证书,配置文件,密码文件都在 /etc/ocserv/下
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1078 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 13ms · UTC 19:28 · PVG 03:28 · LAX 11:28 · JFK 14:28
Developed with CodeLauncher
♥ Do have faith in what you're doing.