Posts Tagged ‘openvpn’

SalixOS, OpenVPN and iproute2

Tuesday, June 25th, 2013

I have an OpenVPN server through which its clients get some routes. One client with SalixOS had an error while connecting to the server:
Linux ip link set failed: could not execute external program
The reason is that OpenVPN client sets the routes with the ‘ip’ command. But Salix doesn’t install the iproute2 package by default. Install it and the connection will be finished.

Openvpn >= 2.1, Windows and *nix clients, topology subnet, client-to-client

Thursday, June 6th, 2013

If you have both Windows and *nix clients in your OpenVPN implementation and need them to be able to communicate with each other (‘client-to’client’ option in the server configuration file), you may face the problem on Windows, while using the stable version of OpenVPN GUI. It’s based on 2.0 OpenVPN, which doesn’t have the ability to handle client connection with /24 subnet mask, and we strongly need it.
In such a case use the development version of OpenVPN GUI. For this moment (June 6, 2013) it is OpenVPN 2.1_beta7 & OpenVPN GUI 1.0.3. The trick is that OpenVPN supports ‘topology xxx’ directive starting from the 2.1 version, and the development package (as for today) for Windows is based on it.
Your Windows client’s configuration file should be similar to this:

client
dev tun
proto udp
remote IP.ADD.RE.SS 1194
topology subnet
nobind
persist-key
persist-tun
;
ca "c:\\program files\\openvpn\\ca.crt"
cert "c:\\program files\\openvpn\\client5.crt"
key "c:\\program files\\openvpn\\client5.key"
;
comp-lzo
verb 3

UPDATE: as for now (January 30, 2018) Windows version is available from other location: https://openvpn.net/index.php/open-source/downloads.html
Howto: https://community.openvpn.net/openvpn/wiki/Easy_Windows_Guide

Постоянные IP-адреса для OpenVPN-клиентов

Friday, November 16th, 2012

Мне известно два способа закрепить постоянный статический IP-адрес за конкретным OpenVPN-клиентом. Здесь я опишу тот, которым воспользовался сам, и который мне показался более простым. Однако в man’е к OpenVPN 2.х написано, что эта опция не гарантирует выдачу одного и того же адреса при кажом подключении (читайте man, параметр –ifconfig-pool-persist).
За этот функционал отвечает опция ifconfig-pool-persist.
В конфиге сервера указываем:
ifconfig-pool-persist /etc/openvpn/ipp.txt 0

В файл /etc/openvpn/ipp.txt пишем :
client1,10.108.4.9
client2,10.108.4.8

У меня не работало, когда первой строкой был комментарий (#). Вомзожно комментарии, начинающиеся с ; допустимы, не пробовал. «client1» и «client2» это названия сертификатов для клиента-1 и клиента-2 (расширение .crt не указывается).

OpenVPN в OpenBSD

Wednesday, July 4th, 2012

OpenBSD – клиент.

В конфиге (который на ура работает в Linux), прописано “dev tun”. В OpenBSD это уже не прокатит. Надо называть интерфейс – tun0.

Не указав этот неприметный ноль, мы получим примерно такие ошибки в выводе OpenVPN’a:

ifconfig: SIOCSIFMTU: Device not configured ifconfig: SIOCGIFFLAGS: Device not configured Thu Sep 17 13:23:44 2009 OpenBSD

ifconfig failed: external program exited with error status: 1 

Thu Sep 17 13:23:44 2009 Exiting

Обсуждение проблемы тут: http://www.daemonforums.org/showthread.php?p=27062