Автор Тема: Как настроить xl2tpd для работы с Beeline  (Прочитано 6217 раз)

Оффлайн K0T

  • Завсегдатай
  • *
  • Сообщений: 215
  • Simply 7.0.5
    • Email
Сходил на первомай в гости к родственникам, установил им Simply второй системой и возникла проблема с интернетом  :-(

Тема Домашний интернет билайн закрыта, поэтому создал новую. Поиск по форуму дал не самые радостные результаты:

Как в network manager добавить поддержку l2tp - v2
Цитата: Skull
А нечего подключаться к Билайну, будь он неладен. С PPTP и PPPOE проблем никаких, а вот L2TP через NM не работает (поддержку уже давно русский автор не актуализирует). Я когда у мамы в Красноярске был, в полной мере это ощутил. Попробуйте установить alterator-net-l2tp и настроить в Центру управления системой.
...
Тогда настраивайте xl2tpd. Увы, вручную.

Настройка интернета через L2TP-соединение

Цитата: Flying_Cat
Я подключался через пакет xl2tpd.
...
Проверено работает в Ubuntu и в Alt Linux

Повторил эти настройки, исправил несколько раз при этом свои грамматические и синтаксические ошибки  :-)
но в результате подключение все равно не устанавливается

# xl2tpd -D
xl2tpd[1339]: setsockopt recvref[30]: Protocol not available
xl2tpd[1339]: Using l2tp kernel support.
xl2tpd[1339]: xl2tpd version xl2tpd-1.3.9 started on comp-core2-duo-1bf73e.localdomain PID:1339
xl2tpd[1339]: Written by Mark Spencer, Copyright (C) 1998, Adtran, Inc.
xl2tpd[1339]: Forked by Scott Balmos and David Stipp, (C) 2001
xl2tpd[1339]: Inherited by Jeff McAdams, (C) 2002
xl2tpd[1339]: Forked again by Xelerance (www.xelerance.com) (C) 2006-2016
xl2tpd[1339]: Listening on IP address 0.0.0.0, port 1701
xl2tpd[1339]: Connecting to host tp.internet.beeline.ru, port 1701
xl2tpd[1339]: Connection established to 83.102.254.223, 1701.  Local: 22545, Remote: 4854 (ref=0/0).
xl2tpd[1339]: Calling on tunnel 22545
xl2tpd[1339]: Call established with 83.102.254.223, Local: 60137, Remote: 56152, Serial: 1 (ref=0/0)
xl2tpd[1339]: start_pppd: I'm running:
xl2tpd[1339]: "/usr/sbin/pppd"
xl2tpd[1339]: "plugin"
xl2tpd[1339]: "pppol2tp.so"
xl2tpd[1339]: "pppol2tp"
xl2tpd[1339]: "7"
xl2tpd[1339]: "passive"
xl2tpd[1339]: "nodetach"
xl2tpd[1339]: ":"
xl2tpd[1339]: "name"
xl2tpd[1339]: "0891072597"
xl2tpd[1339]: "debug"
< задумывается >
xl2tpd[1339]: handle_avps:  don't know how to handle attribute 46.
xl2tpd[1339]: handle_avps:  don't know how to handle attribute 104.
xl2tpd[1339]: control_finish: Connection closed to 83.102.254.223, serial 1 (Locally generated disconnect)
xl2tpd[1339]: Terminating pppd: sending TERM signal to pid 1352
xl2tpd[1339]: control_finish: Connection closed to 83.102.254.223, port 1701 (No application/session timer expired), Local: 22545, Remote: 4854
xl2tpd[1339]: Connecting to host tp.internet.beeline.ru, port 1701
xl2tpd[1339]: Can not find tunnel 22545 (refhim=0)
xl2tpd[1339]: network_thread: unable to find call or tunnel to handle packet.  call = 0, tunnel = 22545 Dumping.
xl2tpd[1339]: handle_avps:  don't know how to handle attribute 46.
xl2tpd[1339]: Connection established to 83.102.254.213, 1701.  Local: 42652, Remote: 60145 (ref=0/0).
xl2tpd[1339]: Calling on tunnel 42652
xl2tpd[1339]: Call established with 83.102.254.213, Local: 25999, Remote: 61304, Serial: 2 (ref=0/0)
xl2tpd[1339]: start_pppd: I'm running:
xl2tpd[1339]: "/usr/sbin/pppd"
xl2tpd[1339]: "plugin"
xl2tpd[1339]: "pppol2tp.so"
xl2tpd[1339]: "pppol2tp"
xl2tpd[1339]: "7"
xl2tpd[1339]: "passive"
xl2tpd[1339]: "nodetach"
xl2tpd[1339]: ":"
xl2tpd[1339]: "name"
xl2tpd[1339]: "0891072597"
xl2tpd[1339]: "debug"
^C xl2tpd[1339]: death_handler: Fatal signal 2 received
xl2tpd[1339]: Terminating pppd: sending TERM signal to pid 1414
xl2tpd[1339]: Connection 60145 closed to 83.102.254.213, port 1701 (Server closing)

подскажите пожалуйста, если кто может, как настроить xl2tpd? Вариант с роутером прошу не предлагать.

Оффлайн yaleks

  • Мастер
  • ***
  • Сообщений: 6 223
вы руками все набивали или copy-paste?

Оффлайн Skull

  • Глобальный модератор
  • *****
  • Сообщений: 19 908
    • Домашняя страница
    • Email
Так с тех пор и NetworkManager-l2tp-gnome должен заработать.
Андрей Черепанов (cas@)

Оффлайн K0T

  • Завсегдатай
  • *
  • Сообщений: 215
  • Simply 7.0.5
    • Email
Цитата: yaleks
вы руками все набивали или copy-paste?

если честно, то и так и так, окончательно проверял в терминале mc
на всякий случай приведу их тут:

/etc/xl2tpd/xl2tpd.conf

# cat xl2tpd.conf
;
; Sample l2tpd configuration file
;
; This example file should give you some idea of how the options for l2tpd
; should work.  The best place to look for a list of all options is in
; the source code itself, until I have the time to write better documentation :)
; Specifically, the file "file.c" contains a list of commands at the end.
;
; You most definitely don't have to spell out everything as it is done here
;
[global] ; Global parameters:
access control = yes
; port = 1701 ; * Bind to port 1701
; auth file = /etc/l2tpd/l2tp-secrets ; * Where our challenge secrets are
; access control = yes ; * Refuse connections without IP match
; rand source = dev                     ; Source for entropy for random
;                                       ; numbers, options are:
;                                       ; dev - reads of /dev/urandom
;                                       ; sys - uses rand()
;                                       ; egd - reads from egd socket
;                                       ; egd is not yet implemented
;
; [lns default] ; Our fallthrough LNS definition
; exclusive = no ; * Only permit one tunnel per host
; ip range = 192.168.0.1-192.168.0.20 ; * Allocate from this IP range
; no ip range = 192.168.0.3-192.168.0.9 ; * Except these hosts
; ip range = 192.168.0.5 ; * But this one is okay
; ip range = lac1-lac2 ; * And anything from lac1 to lac2's IP
; lac = 192.168.1.4 - 192.168.1.8 ; * These can connect as LAC's
; no lac = untrusted.marko.net ; * This guy can't connect
; hidden bit = no ; * Use hidden AVP's?
; local ip = 192.168.1.2 ; * Our local IP to use
; local ip range = 192.168.200.0-192.168.200.20   ; Alternatively, use a range for local addressing
; length bit = yes ; * Use length bit in payload?
; require chap = yes ; * Require CHAP auth. by peer
; refuse pap = yes ; * Refuse PAP authentication
; refuse chap = no ; * Refuse CHAP authentication
; refuse authentication = no ; * Refuse authentication altogether
; require authentication = yes ; * Require peer to authenticate
; unix authentication = no ; * Use /etc/passwd for auth.
; name = myhostname ; * Report this as our hostname
; ppp debug = no ; * Turn on PPP debugging
; pppoptfile = /etc/ppp/options.l2tpd.lns ; * ppp options file
; call rws = 10 ; * RWS for call (-1 is valid)
; tunnel rws = 4 ; * RWS for tunnel (must be > 0)
; flow bit = yes ; * Include sequence numbers
; challenge = yes ; * Challenge authenticate peer ;
; rx bps = 10000000 ; Receive tunnel speed
; tx bps = 10000000 ; Transmit tunnel speed
; bps = 100000 ; Define both receive and transmit speed in one option

; [lac marko] ; Example VPN LAC definition
; lns = lns.marko.net ; * Who is our LNS?
; lns = lns2.marko.net ; * A backup LNS (not yet used)
; redial = yes ; * Redial if disconnected?
; redial timeout = 15 ; * Wait n seconds between redials
; max redials = 5 ; * Give up after n consecutive failures
; hidden bit = yes ; * User hidden AVP's?
; local ip = 192.168.1.1 ; * Force peer to use this IP for us
; remote ip = 192.168.1.2 ; * Force peer to use this as their IP
; length bit = no ; * Use length bit in payload?
; require pap = no ; * Require PAP auth. by peer
; require chap = yes ; * Require CHAP auth. by peer
; refuse pap = yes ; * Refuse PAP authentication
; refuse chap = no ; * Refuse CHAP authentication
; refuse authentication = no ; * Refuse authentication altogether
; require authentication = yes ; * Require peer to authenticate
; name = marko ; * Report this as our hostname
; ppp debug = no ; * Turn on PPP debugging
; pppoptfile = /etc/ppp/options.l2tpd.marko ; * ppp options file for this lac
; call rws = 10 ; * RWS for call (-1 is valid)
; tunnel rws = 4 ; * RWS for tunnel (must be > 0)
; flow bit = yes ; * Include sequence numbers
; challenge = yes ; * Challenge authenticate peer
;
; [lac cisco] ; Another quick LAC
; lns = cisco.marko.net ; * Required, but can take from default
; require authentication = yes
;
[lac beeline]
name = 0891072597
; lns = 85.21.0.243
lns = tp.internet.beeline.ru
ppp debug = yes
redial = yes
redial timeout = 10
require pap = no
require chap = yes
require authentication = no


/etc/ppp/options.pptp:

# cat options.pptp
###############################################################################
# $Id: options.pptp,v 1.4 2012/08/30 21:34:13 quozl Exp $
#
# Sample PPTP PPP options file /etc/ppp/options.pptp
# Options used by PPP when a connection is made by a PPTP client.
# This file can be referred to by an /etc/ppp/peers file for the tunnel.
# Changes are effective on the next connection.  See "man pppd".
#
# You are expected to change this file to suit your system.  As
# packaged, it requires PPP 2.4.2 or later from http://ppp.samba.org/
# and the kernel MPPE module available from the CVS repository also on
# http://ppp.samba.org/, which is packaged for DKMS as kernel_ppp_mppe.
###############################################################################

remotename l2tp
mtu 1460
nodeflate
nobsdcomp
nopcomp
noaccomp
persist
maxfail 0
defaultroute
replacedefaultroute
refuse-mschap

# Lock the port
#lock

# Authentication
# We don't need the tunnel server to authenticate itself
#noauth

# We won't do PAP, EAP, CHAP, or MSCHAP, but we will accept MSCHAP-V2
# (you may need to remove these refusals if the server is not using MPPE)
#refuse-pap
#refuse-eap
#refuse-chap
#refuse-mschap

# Compression
# Turn off compression protocols we know won't be used
#nobsdcomp
#nodeflate

# Encryption
# (There have been multiple versions of PPP with encryption support,
# choose which of the following sections you will use.  Note that MPPE
# requires the use of MSCHAP-V2 during authentication)
#
# Note that using PPTP with MPPE and MSCHAP-V2 should be considered
# insecure:
# http://marc.info/?l=pptpclient-devel&m=134372640219039&w=2
# https://github.com/moxie0/chapcrack/blob/master/README.md
# http://technet.microsoft.com/en-us/security/advisory/2743314

# http://ppp.samba.org/ the PPP project version of PPP by Paul Mackarras
# ppp-2.4.2 or later with MPPE only, kernel module ppp_mppe.o
# If the kernel is booted in FIPS mode (fips=1), the ppp_mppe.ko module
# is not allowed and PPTP-MPPE is not available.
# {{{
# Require MPPE 128-bit encryption
#require-mppe-128
# }}}

# http://mppe-mppc.alphacron.de/ fork from PPP project by Jan Dubiec
# ppp-2.4.2 or later with MPPE and MPPC, kernel module ppp_mppe_mppc.o
# {{{
# Require MPPE 128-bit encryption
#mppe required,stateless
# }}}

в *.secrets "Ваш_логин * Пароль" набирал вручную: <Ваш_логин><пробел> *<пробел><Пароль>

Оффлайн K0T

  • Завсегдатай
  • *
  • Сообщений: 215
  • Simply 7.0.5
    • Email
Цитата: Skull
Так с тех пор и NetworkManager-l2tp-gnome должен заработать.

что-то его не видно в simply:
# apt-cache search l2tp
NetworkManager-l2tp - NetworkManager VPN plugin for l2tp
NetworkManager-l2tp-gtk - Applications for use NetworkManager-l2tp with NetworkManager-applet-gtk
accel-ppp - High performance PPTP/L2TP/PPPoE server
kde4-plasma-nm-connect-l2tp - L2TP support for kde4-plasma-nm
kf5-plasma-nm-connect-l2tp - L2TP support for kf5-plasma-nm
openl2tp - L2TP (RFC2661) server/client
openl2tp-devel - OpenL2TP support files for plugin development
plasma5-nm-connect-l2tp - L2TP support for plasma5-nm
ppp - The PPP daemon and documentation
xl2tpd - Layer 2 Tunnelling Protocol Daemon (RFC 2661)
i586-NetworkManager-l2tp - NetworkManager VPN plugin for l2tp
i586-NetworkManager-l2tp-gtk - Applications for use NetworkManager-l2tp with NetworkManager-applet-gtk
i586-accel-ppp - High performance PPTP/L2TP/PPPoE server
i586-kde4-plasma-nm-connect-l2tp - L2TP support for kde4-plasma-nm
i586-kf5-plasma-nm-connect-l2tp - L2TP support for kf5-plasma-nm
i586-openl2tp - L2TP (RFC2661) server/client
i586-plasma5-nm-connect-l2tp - L2TP support for plasma5-nm
i586-ppp - The PPP daemon and documentation
alterator-net-l2tp - Alterator module to configure L2TP connections
python-module-scapy - Python module for scapy.

попробовал поставить NetworkManager-l2tp, alterator-net-l2tp и openl2tp, но либо они не работают, либо я что-то ничего не вижу ни в самом альтераторе, ни в настройках сети  :-(



Оффлайн Skull

  • Глобальный модератор
  • *****
  • Сообщений: 19 908
    • Домашняя страница
    • Email
Перепутал. -l2tp-gtk.
Андрей Черепанов (cas@)

Оффлайн K0T

  • Завсегдатай
  • *
  • Сообщений: 215
  • Simply 7.0.5
    • Email
Вроде как все заработало

# apt-get install NetworkManager-l2tp-gtk
Чтение списков пакетов... Завершено
Построение дерева зависимостей... Завершено
Следующие дополнительные пакеты будут установлены:
  NetworkManager-l2tp
Следующие НОВЫЕ пакеты будут установлены:
  NetworkManager-l2tp NetworkManager-l2tp-gtk
0 будет обновлено, 2 новых установлено, 0 пакетов будет удалено и 0 не будет обновлено.
Необходимо получить 106kB/136kB архивов.
После распаковки потребуется дополнительно 582kB дискового пространства.
Продолжить? [Y/n] y
Получено: 1 http://mirror.yandex.ru p8/branch/x86_64/classic NetworkManager-l2tp-gtk 1.2.8-alt0.M80P.1 [106kB]
Получено 106kB за 0s (491kB/s).             
Совершаем изменения...
Preparing...                 ########################################### [100%]
1: NetworkManager-l2tp       ########################################### [ 50%]
2: NetworkManager-l2tp-gtk   ########################################### [100%]
Running /usr/lib/rpm/posttrans-filetriggers
Завершено.

Это конечно не ответ на вопрос в теме, а скорее более простое альтернативное решение  :-)

Значения MTU/MRU по умолчанию стояли 1400, переставил на 1460

Заодно пока ковырялся разгребая закрома еще парочку вопросов для себя решил:
1) то, что принимал просто за запасную антенну, оказалось DLink DWA-127 - прекрасно заводится и цепляется к соседскому wifi без дополнительных действий
2) старый роутер TPLink WR741N тоже настраивается к билайну (хотя его и нет там в списке поддерживаемых), но у него сдох модуль wifi