ALT Linux sysadmins discussion
 help / color / mirror / Atom feed
From: Serg Tselishev <rotkart@gmail.com>
To: "ALT Linux sysadmins' discussion" <sysadmins@lists.altlinux.org>
Subject: Re: [Sysadmins] Нужна консультация по настройке openvpn в etcnet [решено]
Date: Thu, 20 Dec 2012 13:45:52 +0300
Message-ID: <CAHMX-ra6zn4X-FNXPFUqFPnffkzG+7k5aQj0700S54pQa5+R_g@mail.gmail.com> (raw)

19 декабря 2012 г., 11:52 пользователь Mikhail Efremov
<sem@altlinux.ru> написал:
> Можно попробовать увеличить DHCP_TIMEOUT, но я бы установил
> BOOTPROTO=static и запускал/останавливал dhcpcd сам в
> ifup-post/ifdown-post скриптах.
> Но вообще хорошо бы чтобы etcnet такую ситуацию обрабатывал
> правильно.
> А вариант раздачи адресов самим openvpn-сервером не подходит?
>
> --
> WBR, Mikhail Efremov
> _______________________________________________
> Sysadmins mailing list
> Sysadmins@lists.altlinux.org
> https://lists.altlinux.org/mailman/listinfo/sysadmins

Спасибо, что навели на мысль про тайм-аут!
Параметр DHCP_TIMEOUT в man etcnet_options отсутствует,
зато в man dhcpcd я нашёл решение проблемы:

[root@sterver ~]# cat /etc/net/ifaces/tap0/options
DISABLED=no
ONBOOT=yes
TYPE=ovpn
TUNTAP_USER=openvpn
BOOTPROTO=dhcp
DHCP_CLIENT=/sbin/dhcpcd
DHCP_ARGS="--background --timeout 60 -C resolv.conf"
REQUIRES="eth1"

[root@sterver ~]# cat /etc/net/ifaces/tap0/ovpnoptions
remote 81.ххх.ххх.60
dev tap
lladdr ee:05:99:1b:10:36
secret /etc/openvpn/keys/static.key
proto udp
comp-lzo
script-security 2

То есть всего-то надо указать dhcpcd просить аренду в фоновом режиме -
и, пока там идёт тайм-аут, успевает установиться openvpn-соединение!!!
Завтра перезапущу машину, чтобы посмотреть так это или нет, но service
network reload отрабатывает уже сейчас.

Еще раз спасибо!!!
-- 
С уважением,
Целищев Сергей

             reply	other threads:[~2012-12-20 10:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-20 10:45 Serg Tselishev [this message]
2013-01-18 19:01     ` Michael Shigorin
2013-01-24  6:27       ` Serg Tselishev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHMX-ra6zn4X-FNXPFUqFPnffkzG+7k5aQj0700S54pQa5+R_g@mail.gmail.com \
    --to=rotkart@gmail.com \
    --cc=sysadmins@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux sysadmins discussion

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sysadmins/0 sysadmins/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 sysadmins sysadmins/ http://lore.altlinux.org/sysadmins \
		sysadmins@lists.altlinux.org sysadmins@lists.altlinux.ru sysadmins@lists.altlinux.com
	public-inbox-index sysadmins

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.sysadmins


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git