ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: Olvin <olvin@rambler.ru>
To: ALT Linux Community general discussions <community@lists.altlinux.org>
Subject: Re: [Comm] l2tp
Date: Fri, 07 Aug 2009 16:58:48 +0300
Message-ID: <4A7C3318.4060209@rambler.ru> (raw)
In-Reply-To: <20090805103631.GO17881@osdn.org.ua>

Michael Shigorin wrote:
> On Wed, Aug 05, 2009 at 08:40:19AM +0300, Olvin wrote:
>>>> Из бранча 5.0 работает в точности по инструкциям Гаранта. А в
>>>> 4.1.x действительно затык. Попробуй выкачать отдельно пакет
>>>> l2tpd из бранча и поставить его.
>>> Как думаете, стоит обновить для 4.1?  Можно закинуть в backports,
>>> а если понравится, то положить в бранч.
>> Я просто взял из бранча 5.0, и оно работает. Стоит ли делать backport? 
>> Ну, возможно. Что б всё красиво было :)
> 
> Брали _только_ пакет l2tpd?  Я почему удивляюсь:
> 
> -rw-r--r--  4 mike mike 132170 May 16  2006 4.0/SRPMS/l2tpd-0.69-alt2.src.rpm
> -rw-r--r--  3 mike mike 132170 May 16  2006 4.1/SRPMS/l2tpd-0.69-alt2.src.rpm
> -rw-r--r--  3 mike mike 132170 May 16  2006 5.0/SRPMS/l2tpd-0.69-alt2.src.rpm
> 
>> И ещё: оно не работает до отключения dnsmasq (в конфиге
>> прописывал DNS-имя VPN-сервера, а не IP-адрес). Вероятно, можно
>> и настроить грамотно, но не было времени возиться, я просто
>> взял и отключил, т.к.  мне на десктопе он не нужен.
> 
> Хорошо бы на вики завести страничку "VPN" и туда начать скидывать
> всякие прыжки в ширину, к которым приходится прибегать со всем
> этим зоопарком (статические маршруты и т.п.)... не займётесь ли?

Хм... Я в шоке. Что я первый раз делал не так?

На чистый 4.1.1 Desktop установил l2tpd из бранча, файлы:

# cat /etc/l2tpd/l2tpd.conf
[global]
access control = yes
[lac garant]
lns = адрес.VPN.сервера
redial = yes
redial timeout = 1
require chap = yes
require authentication = no
name = Имя_пользователя
ppp debug = yes
pppoptfile = /etc/ppp/options.l2tpd
require pap = no
autodial = yes

# cat /etc/ppp/options.l2tpd
unit 0
name Имя_пользователя
remotename l2tp
ipparam garant
connect /bin/true
mru 1460
mtu 1460
nodeflate
nobsdcomp
persist
maxfail 0
nopcomp
noaccomp
defaultroute
replacedefaultroute

# cat /etc/ppp/chap-secrets
"Имя_пользователя" * "password"

Запускаю:

# /usr/sbin/l2tpd -D -c /etc/l2tpd/l2tpd.conf

Работает.

Чтобы было удобно, я сделал скрипты:

/usr/local/bin/inet-start.sh:

#!/bin/sh

l2tpd

и /usr/local/bin/inet-stop.sh:

#!/bin/sh

ifdown ppp0 # так надо
sleep 2
killall l2tpd
sleep 3
killall -9 l2tpd # так тоже _бывает_ надо

И запускаю их через sudo, вот /etc/sudoers:

User_Alias      INET_USERS = myuser
Cmnd_Alias      INET_CMDS = 
/usr/local/bin/inet-start.sh,/usr/local/bin/inet-stop.sh
INET_USERS   ALL=NOPASSWD:INET_CMDS

А чтобы совсем было удобно, делаю запуск через пользовательские пункты 
меню KNemo (inet-on, inet-off).


  parent reply	other threads:[~2009-08-07 13:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-03 12:32 Кпруподёров Сергей
2009-07-03 13:08 ` Ivan Fedorov
2009-07-03 16:21 ` George V. Kouryachy
2009-07-03 19:01 ` Olvin
2009-07-24 21:14   ` Michael Shigorin
2009-08-05  5:40     ` Olvin
2009-08-05 10:36       ` Michael Shigorin
2009-08-05 12:58         ` Olvin
2009-08-07 13:58         ` Olvin [this message]
2009-07-06 13:42 ` Sergey

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=4A7C3318.4060209@rambler.ru \
    --to=olvin@rambler.ru \
    --cc=community@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 Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/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 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

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


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