open***配置文件中文解析

# 哪一个本地ip地址将被Open***监听?
# 也能够不注明
;local a.b.c.d
# 哪个tcp/udp端口将被监听?
# 若是你要在一台机器上启动多个Open×××,你须要监听不一样的端口
# 记着在防火墙那里打开这些端口
port 1194
# TCP仍是UDP协议?
# 若是采用HTTP proxy,必须使用TCP协议
proto udp
# “dev tun” 将建立1个路由隧道
# “dev tap” 将建立1个以太网隧道
# 若是你选择桥模式,使用 “dev tap”
# 若是你须要控制每一个客户端的访问控制策略
# 你必须建立防火墙规则到TUN/TAP接口
# 在非Windows系统上,你能够明确该接口,如:tun0
# 在Windows上,使用”dev-node”
# 在大多数系统上,若是你的防火墙部分或所有禁止TUN/TAP接口的话,Open***将可能不起做用
;dev tap
dev tun
# 在Windows上若是你更多的网络接口,你须要在网络链接控制面板上增长
# TAP-Win32适配器接口名
# 在XP SP2或更高系统上,你须要使windows防火墙对该接口不执行过滤规则
# 非Windows系统一般不须要设置这个
;dev-node MyTap
# 证书/key文件指向
ca ca.crt #Open×××使用的ROOT CA,使用build-ca生成的,用于验证客户是证书是否合法
cert server.crt #Server使用的证书文件
key server.key #Server使用的证书对应的key,该文件必须严格控制其安全性
#CRL文件的申明,被吊销的证书链,这些证书将没法登陆
;crl-verify ***crl.pem
# Diffie hellman文件指向
# 若是你在创建证书时使用2048的话这里是2048
# 不然默认
dh dh1024.pem
# 给接入的client分配的地址段
server 192.168.80.0 255.255.255.0
# 维护客户端和虚拟ip地址联系
# 在open***重启时,再次链接的客户端将依然被分配和之前同样的
# ip地址
ifconfig-pool-persist ipp.txt
# open***桥模式用的[我不用桥模式]
# 配置服务器桥接模式的前提是必须将俩网卡在操做系统下先创建桥接,以后手动设置ip地址和子网掩码。
;server-bridge 10.8.0.4 255.255.255.0 10.8.0.50 10.8.0.100
# 下面这句使客户端能访问服务器后面的子网机器
# 好比:服务器子网网段是192.168.10.0和192.168.10.2
# 你须要在open×××服务器端配置文件中添加下面这两句
push “route 192.168.10.0 255.255.255.0″
push “route 192.168.20.0 255.255.255.0″
# 使服务器子网内机器能够访问客户端子网内机器
# 仅用于路由模式
# 假设:客户端子网网段192.168.40.0
# 首先,在服务器配置文件中添加下面这两行
#    client-config-dir ccd
# 和route 192.168.40.0 255.255.255.0
# 而后在服务器端ccd目录下建立一个文件,文件名是客户端的公共名
# 文件内容是:
#    iroute 192.168.40.0 255.255.255.0
;client-config-dir ccd
;route 192.168.40.0 255.255.255.0
# EXAMPLE: Suppose you want to give
# Thelonious a fixed ××× IP address of 10.9.0.1.
# First uncomment out these lines:
;client-config-dir ccd
;route 10.9.0.0 255.255.255.252
# Then add this line to ccd/Thelonious:
# ifconfig-push 10.9.0.1 10.9.0.2
# 支持对不一样客户端组执行不一样的防火墙策略
# 这里有两种方法
# (1) 运行多个Open×××守护进程, 每一个对应不一样的组
#    而且防火墙对不一样的组和进程执行不一样的策略
# (2) (高级)建立1个动态脚本使防火墙对接入的不一样客户端执行不一样的策略
;learn-address ./script
# 下面这句使客户端全部网络通讯经过***
# If enabled, this directive will configure
# all clients to redirect their default
# network gateway through the ×××, causing
# all IP traffic such as web browsing and
# and DNS lookups to go through the ×××
# (The Open××× server machine may need to NAT
# the TUN/TAP interface to the internet in
# order for this to work properly).
# CAVEAT: May break client’s network config if
# client’s local DHCP server packets get routed
# through the tunnel. Solution: make sure
# client’s local DHCP server is reachable via
# a more specific route than the default route
# of 0.0.0.0/0.0.0.0.
;push “redirect-gateway”
# 客户端DHCP设置
# Certain Windows-specific network settings
# can be pushed to clients, such as DNS
# or WINS server addresses. CAVEAT:
# http://open***.net/faq.html#dhcpcaveats
;push “dhcp-option DNS 10.8.0.1″
;push “dhcp-option WINS 10.8.0.1″
# 下面这句使客户端能相互访问
# 不然,默认设置下客户端间不能相互访问
client-to-client
# 这段经常使用于测试用途,注释该条可实现限制一个证书在同一时刻只能有一个客户端接入
# Uncomment this directive if multiple clients
# might connect with the same certificate/key
# files or common names. This is recommended
# only for testing purposes. For production use,
# each client should have its own certificate/key
# pair.
# IF YOU HAVE NOT GENERATED INDIVIDUAL
# CERTIFICATE/KEY PAIRS FOR EACH CLIENT,
# EACH HAVING ITS OWN UNIQUE “COMMON NAME”,
# UNCOMMENT THIS LINE OUT.
;duplicate-cn
# 活动链接保时期限
# The keepalive directive causes ping-like
# messages to be sent back and forth over
# the link so that each side knows when
# the other side has gone down.
# Ping every 10 seconds, assume that remote
# peer is down if no ping received during
# a 120 second time period.
keepalive 10 120
# 为防止遭到DDoS***
# 生成ta.key文件,并cp到服务器端和每一个客户端
# 该文件用如下命令生成
# open*** –genkey –secret ta.key
# 服务器端0,客户端1
# 该文件要严格保护
tls-auth ta.key 0 # 服务器端是0
# 选择一种加密算法,Server端和client端必须同样
# Select a cryptographic cipher.
# This config item must be copied to
# the client config file as well.
;cipher BF-CBC        # Blowfish (default)
;cipher AES-128-CBC # AES
;cipher DES-EDE3-CBC # Triple-DES
# 容许数据压缩
# 客户端配置文件也须要有这项
comp-lzo
# 最大客户端并发链接数量
;max-clients 100
#定义运行open***的用户
;user nobody
;group nobody
#经过keepalive检测超时后,从新启动×××,不从新读取keys,保留第一次使用的keys
persist-key
#经过keepalive检测超时后,从新启动×××,一直保持tun或者tap设备是linkup的,
#不然网络链接会先linkdown而后linkup
persist-tun
#按期把open***的一些状态信息写到文件中,以便本身写程序计费或者进行其余操做
status open***-status.log
#记录日志,每次从新启动open***后删除原有的log信息
;log        open***.log
#或者
#记录日志,每次从新启动open***后追加原有的log信息
log-append open***.log #[为便于管理log可将该项改成/var/log/open***.log]
# 设置日志记录冗长级别
# 0 is silent, except for fatal errors
# 4 is reasonable for general usage
# 5 and 6 can help to debug connection problems
# 9 is extremely verbose
verb 3
# 重复日志记录限额 # Silence repeating messages. At most 20 # sequential messages of the same message # category will be output to the log. mute 20
相关文章
相关标签/搜索