server.conf
Код: Выделить всё
local xx.xx.xx.xx
dev tap
proto tcp-server
mode server
comp-lzo
log /var/log/openvpn/openvpn.log
#log-append /var/log/openvpn/openvpnapp.log
status /var/log/openvpn/openvpn-status.log
daemon
ifconfig 10.11.0.1 255.255.0.0
tls-server
tls-auth keys/ta.key 0
ca /usr/local/etc/openvpn/keys/ca.crt
cert /usr/local/etc/openvpn/keys/server.crt
key /usr/local/etc/openvpn/keys/server.key
dh /usr/local/etc/openvpn/keys/dh1024.pem
push "redirect-gateway"
push "dhcp-option DNS yy.yy.yy.yy"
port 1194
user nobody
group nobody
persist-tun
persist-key
verb 0
# включаем шифрацию пакетов
cipher BF-CBC
keepalive 10 120
client-config-dir ccd
# разрешаем обмен трафиком между клиентами
client-to-client
# разрешаем дублирование сертифкатов
#duplicate-cn
Код: Выделить всё
#ip-address клиента
ifconfig-push 10.11.0.56 255.255.0.0
#доступные маршруты
push "route 0.0.0.0 0.0.0.0 10.11.0.1"
Код: Выделить всё
client
dev tap
proto tcp
remote xx.xx.xx.xx 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert admin.crt
key admin.key
tls-auth ta.key 1
comp-lzo
verb 3
ns-cert-type server
tun-mtu 1500
route-method exe
route-delay 5
Код: Выделить всё
# uname -r
# 7.2-RELEASE