Update. Проблему решил вопрос закрыт

http://www.lissyara.su/?id=1712
P.S. в АД надо включить лдап-сервер. Думаю это будет самый простой метод.
server 10.10.1.0 255.255.255.0 поменял маску на 255.255.252.0тогда номер сети надо на 10.10.0.0 поменять. не может быть сети 10.10.1.0/255.255.252.0
В. Чем отличаются виртуальные устройства tun и tap?
О. TUN - туннель, соединение по которому указывается по типу: локальный IP < --- > удаленный IP. Например, при явном указании ifconfig:
--ifconfig 10.3.0.2 10.3.0.1
в этом примере 10.3.0.2 - локальный IP, 10.3.0.1 - удаленный IP
TAP - эмулирует виртуальную ethernet карточку, для которой требуется указывать локальный IP и маску подсети. Например:
--ifconfig 10.3.0.2 255.255.255.0
--auth-user-pass-verify script methodдля выдачи пользователям конкретного ип можно использовать
Require the client to provide a username/password (possibly in addition to a client certificate) for authentication.
OpenVPN will execute script as a shell command to validate the username/password provided by the client.
If method is set to "via-env", OpenVPN will call script with the environmental variables username and password set to the username/password strings provided by the client. Be aware that this method is insecure on some platforms which make the environment of a process publicly visible to other unprivileged processes.
If method is set to "via-file", OpenVPN will write the username and password to the first two lines of a temporary file. The filename will be passed as an argument to script, and the file will be automatically deleted by OpenVPN after the script returns. The location of the temporary file is controlled by the --tmp-dir option, and will default to the current directory if unspecified. For security, consider setting --tmp-dir to a volatile storage medium such as /dev/shm (if available) to prevent the username/password file from touching the hard drive.
The script should examine the username and password, returning a success exit code (0) if the client's authentication request is to be accepted, or a failure code (1) to reject the client.
This directive is designed to enable a plugin-style interface for extending OpenVPN's authentication capabilities.
To protect against a client passing a maliciously formed username or password string, the username string must consist only of these characters: alphanumeric, underbar ('_'), dash ('-'), dot ('.'), or at ('@'). The password string can consist of any printable characters except for CR or LF. Any illegal characters in either the username or password string will be converted to underbar ('_').
Care must be taken by any user-defined scripts to avoid creating a security vulnerability in the way that these strings are handled. Never use these strings in such a way that they might be escaped or evaluated by a shell interpreter.
For a sample script that performs PAM authentication, see sample-scripts/auth-pam.pl in the OpenVPN source distribution.
--client-connect scriptболее детально всё тут http://openvpn.net/index.php/open-source/documentation/manuals/69-openvpn-21.html
Run script on client connection. The script is passed the common name and IP address of the just-authenticated client as environmental variables (see environmental variable section below). The script is also passed the pathname of a not-yet-created temporary file as $1 (i.e. the first command line argument), to be used by the script to pass dynamically generated config file directives back to OpenVPN.
If the script wants to generate a dynamic config file to be applied on the server when the client connects, it should write it to the file named by $1.
See the --client-config-dir option below for options which can be legally used in a dynamically generated config file.
Note that the return value of script is significant. If script returns a non-zero error status, it will cause the client to be disconnected.
каким образом в переменную окружения передается пасс и логин от пользователя?
If method is set to "via-env", OpenVPN will call script with the environmental variables username and password set to the username/password strings provided by the client
If method is set to "via-file", OpenVPN will write the username and password to the first two lines of a temporary file. The filename will be passed as an argument to script, and the file will be automatically deleted by OpenVPN after the script returns
как подобное можно сделать на VBS или ПХП и читать из базы MySQL или FireBird. Возможно ли такое?я ни вбс, ни пхп не знаю, да и лень было б переписывать перловый скрипт на этом. на пхп 100% можно читать из мускуля, да и из файрбёрда наверное
rain87
с мануалом все ястно, спасиб, просто более детально хотелось бы уточнить каким образом в переменную окружения передается пасс и логин от пользователя? В скипте необходимо указать файл (временный, а из него читать) или каким образом? Ваш пример с скриптами как нельзя удобнее подходит, но в Перле я ни как и поэтому хотел бы уточнить как подобное можно сделать на VBS или ПХП и читать из базы MySQL или FireBird. Возможно ли такое?
duplicate-cn (чтоб использовать единый серт для клиентов)
$login = getenv("username"); // получаем логинда, как то так. потом проверяешь их в базе, и если всё ок, то выходишь с кодом 0 (exit(0)), если чёто не так, то с ненулевым кодом
$pass = getenv("password"); // получаем пасс
З.Ы. может с лдап-ом разберетесь ?никогда не работал с виндовым доменом
auth-user-pass-verify script method
script - имя твоего скрпта
method - либо via-env, либо via-file
т.е., например:
auth-user-pass-verify "C:\\openvpn\\my_cool_script.php" via-env
Если я правильно понимаю... надо как-то маршрут задать чтобы пакеты с vpn-интерфейса передавались на локальный интерфейс а с него в локальную сеть.не совсем. надо разрешить форвардинг пакетов, а на компах локальной сети надо прописать маршруты, чтоб они знали, где находится отправитель (т.е., по сути, надо им сказать, что сеть 10.2.75.0/24 доступна через 200.1.80.9). по умолчанию комп будет отсылать ответ на дефолтный маршрут
Сейчас расшарил локальное подключение на клиенте сети2 (Общий доступ в Интернет)...Сеть за клиентом доступна, но эт как-то не правильно...почему, вполне нормальное решение. клиент овпн подменяет адрес отправителя (10.2.75.0/24) на свой (200.1.80.9), и клиенты сети2 будут думать, что они общаются с машиной из их сети
tracert на локальный адрес компа за клиентом выдает что пакеты идут:вот тут не понял, откуда взялся адсл роутер?
vpn-интерфейс клиента сети2 --> шлюз интернета сети2(adsl-router) --> ip адрес машины за клиентом сети2
Страницы: 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
Предыдущая тема: конвертация mdf в sql