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: Mon, 17 Dec 2012 22:51:39 +0300
Message-ID: <CAHMX-rYq4Oov7jb8jUnGBLP2PMAhpouE=+PPtPHTdYgNXu5gTg@mail.gmail.com> (raw)
In-Reply-To: <50CF6CD8.90007@gmail.com>

17 декабря 2012 г., 23:04 пользователь Alexandr Kobets
<kobets.alexandr@gmail.com> написал:
> Можно и в client.conf:
> up /path/to/script
>
>
> --
> WBR, Alexandr Kobets

Не происходит соединения - отваливается по тайм-ауту :-(

Dec 17 23:34:14 sterver openvpn: Adjusting environment for openvpn: succeeded
Dec 17 23:34:15 sterver openvpn[30742]: OpenVPN 2.1.4
x86_64-alt-linux-gnu [SSL] [LZO2] [EPOLL] built on Nov 30 2010
Dec 17 23:34:15 sterver openvpn[30742]: IMPORTANT: OpenVPN's default
port number is now 1194, based on an official port number assignment
by IANA.  OpenVPN 2.0-beta16 and earlier used 5000 as the default
port.
Dec 17 23:34:15 sterver openvpn[30742]: NOTE: the current
--script-security setting may allow this configuration to call
user-defined scripts
Dec 17 23:34:15 sterver openvpn[30742]: LZO compression initialized
Dec 17 23:34:15 sterver openvpn[30742]: TUN/TAP device tap0 opened
Dec 17 23:34:15 sterver openvpn[30742]: /sbin/ip link set addr
ee:05:99:1b:10:36 dev tap0
Dec 17 23:34:15 sterver openvpn[30742]: TUN/TAP link layer address set
to ee:05:99:1b:10:36
Dec 17 23:34:15 sterver openvpn[30742]: /etc/openvpn/dhcp_tun0.sh tap0
1500 1577   init
Dec 17 23:34:45 sterver dhcpcd[30793]: tap0: dhcpcd 4.0.15 starting
Dec 17 23:34:45 sterver openvpn: tap0: dhcpcd 4.0.15 starting
Dec 17 23:34:45 sterver dhcpcd[30793]: tap0: broadcasting for a lease
Dec 17 23:34:45 sterver openvpn: tap0: broadcasting for a lease
Dec 17 23:35:15 sterver dhcpcd[30793]: tap0: timed out
Dec 17 23:35:15 sterver openvpn: tap0: timed out
Dec 17 23:35:15 sterver openvpn[30742]: script failed: external
program exited with error status: 1
Dec 17 23:35:15 sterver openvpn[30742]: Exiting
Dec 17 23:35:15 sterver openvpn: openvpn startup failed

То есть он начинает запускать скрипт сразу после установки мак-адреса
интерфейса, до чрута - тогда когда еще тоннеля еще не установлено.

Вот без скрипта:
Dec 17 23:36:13 sterver openvpn: Adjusting environment for openvpn: succeeded
Dec 17 23:36:14 sterver openvpn[30951]: OpenVPN 2.1.4
x86_64-alt-linux-gnu [SSL] [LZO2] [EPOLL] built on Nov 30 2010
Dec 17 23:36:14 sterver openvpn[30951]: IMPORTANT: OpenVPN's default
port number is now 1194, based on an official port number assignment
by IANA.  OpenVPN 2.0-beta16 and earlier used 5000 as the default
port.
Dec 17 23:36:14 sterver openvpn[30951]: NOTE: OpenVPN 2.1 requires
'--script-security 2' or higher to call user-defined scripts or
executables
Dec 17 23:36:14 sterver openvpn[30951]: LZO compression initialized
Dec 17 23:36:14 sterver openvpn[30951]: TUN/TAP device tap0 opened
Dec 17 23:36:14 sterver openvpn[30951]: /sbin/ip link set addr
ee:05:99:1b:10:36 dev tap0
Dec 17 23:36:14 sterver openvpn[30951]: TUN/TAP link layer address set
to ee:05:99:1b:10:36
Dec 17 23:36:14 sterver openvpn[30984]: chroot to '/var/lib/openvpn'
and cd to '/' succeeded
Dec 17 23:36:14 sterver openvpn[30984]: GID set to openvpn
Dec 17 23:36:14 sterver openvpn[30984]: UID set to openvpn
Dec 17 23:36:14 sterver openvpn[30984]: UDPv4 link local (bound): [undef]:1194
Dec 17 23:36:14 sterver openvpn[30984]: UDPv4 link remote: 81.ххх.ххх.60:1194
Dec 17 23:36:14 sterver openvpn: openvpn startup succeeded
Dec 17 23:36:14 sterver openvpn[30984]: Peer Connection Initiated with
81.ххх.ххх.60:1194
Dec 17 23:36:15 sterver openvpn[30984]: Initialization Sequence Completed

А теперь руками dhcpcd -C resolv.conf tap0:
Dec 17 23:38:05 sterver dhcpcd[31052]: tap0: dhcpcd 4.0.15 starting
Dec 17 23:38:05 sterver dhcpcd[31052]: tap0: broadcasting for a lease
Dec 17 23:38:05 sterver dhcpcd[31052]: tap0: offered 192.168.23.200
from 192.168.23.1
Dec 17 23:38:05 sterver dhcpcd[31052]: tap0: acknowledged
192.168.23.200 from 192.168.23.1
Dec 17 23:38:05 sterver dhcpcd[31052]: tap0: leased 192.168.23.200 for
22896000 seconds
-- 
С уважением,
Целищев Сергей


  reply	other threads:[~2012-12-17 19:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-17 17:52 Serg Tselishev
2012-12-17 18:33 ` Alexandr Kobets
2012-12-17 18:49   ` Serg Tselishev
2012-12-17 19:04     ` Alexandr Kobets
2012-12-17 19:51       ` Serg Tselishev [this message]
2012-12-18  5:44 ` Serg Tselishev
2012-12-19  7:52   ` Mikhail Efremov
2012-12-20  7:40     ` Serg Tselishev
2012-12-20 10:47       ` Serg Tselishev
2012-12-20 12:07         ` Денис Смирнов
2012-12-20 16:34           ` 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-rYq4Oov7jb8jUnGBLP2PMAhpouE=+PPtPHTdYgNXu5gTg@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