Показать сообщение отдельно
Старый 21.10.2019, 18:06   #11
LordN
Senior Member
 
Регистрация: Dec 2007
Адрес: Томск
Сообщения: 4 163
Благодарил(а): 240 раз(а)
Поблагодарили: 165 раз(а) в 157 сообщениях
По умолчанию Ответ: более одной openVPN на одном компе без виртуалки

с впн обнаружилась вот такая проблема - ноут или комп поднятый из сна или гипера, службу вроде держит включенной, но соединения при этом нет.
как бы сделать чтобы если нет пинга на впн-сервер, служба перезапускалась или соединение реконнектилось.
мне пытались подсказать - типа юзай --keep alive, но я нихрена не понял.
м.б. тут есть кто-то более умный и подскажет что имелось ввиду?

Код:
 --keepalive interval timeout
              A helper directive designed to simplify the expression of --ping and --ping-restart.

              This option can be used on both client and server side, but it is enough to add this on the server side as it will
push  appropriate  --ping
              and  --ping-restart  options to the client.  If used on both server and client, the values pushed from server will
override the client local
              values.

              The timeout argument will be twice as long on the server side.  This ensures that a timeout is detected on client 
side  before  the  server
              side drops the connection.

              For example, --keepalive 10 60 expands as follows:

                   if mode server:
                     ping 10                    # Argument: interval
                     ping-restart 120           # Argument: timeout*2
                     push "ping 10"             # Argument: interval
                     push "ping-restart 60"     # Argument: timeout
                   else
                     ping 10                    # Argument: interval
                     ping-restart 60            # Argument: timeout
все что я понял какой-то текст можно добавить прямо в client.ovpn и он будет делать реконнект всегда когда нет пинга какое-то время.


__________________
C уважением, LordN
LordN вне форума   Ответить с цитированием