Решил рискнуть настроить l2tp на Funtoo. И так имеем до поднятия vpn:
ifconfig
eth0 Link encap:Ethernet HWaddr 00:50:8d:91:74:32
inet addr:10.64.117.112 Bcast:10.64.117.255 Mask:255.255.254.0
inet6 addr: fe80::250:8dff:fe91:7432/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:36858 errors:0 dropped:0 overruns:0 frame:0
TX packets:33151 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:32806268 (31.2 MiB) TX bytes:5055129 (4.8 MiB)
Interrupt:44 Base address:0x4000
route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.0.0 10.64.117.254 255.0.0.0 UG 202 0 0 eth0
10.64.116.0 0.0.0.0 255.255.254.0 U 202 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
172.16.0.0 10.64.117.254 255.240.0.0 UG 202 0 0 eth0
192.168.0.0 10.64.117.254 255.255.0.0 UG 202 0 0 eth0
Затем ставлю пакет: net-dialup/xl2tpd Ну и конфиги:
cat /etc/xl2tpd/xl2tpd.conf
[global]
access control = yes
port=1701
[lac garanta]
lns = 172.31.1.246
redial = yes
redial timeout = 5
require chap = yes
require authentication = no
name = chipset_bak
ppp debug = yes
pppoptfile = /etc/ppp/options.xl2tpd
require pap = no
autodial = yes
cat /etc/ppp/options.xl2tpd
unit 0
name chipset_bak
remotename l2tp
ipparam vpn
#connect /bin/true
mru 1460
mtu 1460
#lcp-echo-interval 3
#lcp-echo-failure 8
#logfile /var/log/pppd
nodeflate
nobsdcomp
persist
#maxfail 0
nopcomp
noaccomp
defaultroute
#replacedefaultroute
Поднимаю vpn /etc/init.d/xl2tpd start В логах вижу следующее:
Feb 29 16:06:03 [xl2tpd] setsockopt recvref[22]: Protocol not available_
Feb 29 16:06:03 [xl2tpd] This binary does not support kernel L2TP._
Feb 29 16:06:03 [xl2tpd] xl2tpd version xl2tpd-1.3.0 started on chipset.*-rzn.ru PID:2931_
Feb 29 16:06:03 [xl2tpd] Written by Mark Spencer, Copyright (C) 1998, Adtran, Inc._
Feb 29 16:06:03 [xl2tpd] Forked by Scott Balmos and David Stipp, (C) 2001_
Feb 29 16:06:03 [xl2tpd] Inherited by Jeff McAdams, (C) 2002_
Feb 29 16:06:03 [xl2tpd] Forked again by Xelerance (www.xelerance.com) (C) 2006_
Feb 29 16:06:03 [xl2tpd] Listening on IP address 0.0.0.0, port 1701_
Feb 29 16:06:03 [xl2tpd] Connecting to host 172.31.1.246, port 1701_
Feb 29 16:06:03 [xl2tpd] Connection established to 172.31.1.246, 1701. Local: 49493, Remote: 10356 (ref=0/0)._
Feb 29 16:06:03 [xl2tpd] Calling on tunnel 49493_
Feb 29 16:06:03 [xl2tpd] Call established with 172.31.1.246, Local: 10953, Remote: 36252, Serial: 1 (ref=0/0)_
Feb 29 16:06:03 [pppd] pppd 2.4.5 started by root, uid 0
Feb 29 16:06:03 [pppd] Using interface ppp0
Feb 29 16:06:03 [pppd] Connect: ppp0 <--> /dev/pts/2
Feb 29 16:06:03 [dhcpcd] ppp0: sending IPv6 Router Solicitation
Feb 29 16:06:03 [dhcpcd] ppp0: sendmsg: Network is unreachable
Feb 29 16:06:03 [dhcpcd] ppp0: waiting for 3rd party to configure IP address
Feb 29 16:06:04 [pppd] CHAP authentication succeeded
- Last output repeated twice -
Feb 29 16:06:04 [pppd] local IP address 91.203.66.*
Feb 29 16:06:04 [pppd] remote IP address 10.100.0.*
Feb 29 16:06:04 [dhcpcd] ppp0: removing IP address 0.0.0.0/0
Feb 29 16:06:07 [dhcpcd] ppp0: sending IPv6 Router Solicitation
Feb 29 16:06:07 [dhcpcd] ppp0: sendmsg: Network is unreachable
Feb 29 16:06:11 [dhcpcd] ppp0: sending IPv6 Router Solicitation
Feb 29 16:06:11 [dhcpcd] ppp0: sendmsg: Network is unreachable
Feb 29 16:06:15 [dhcpcd] ppp0: sending IPv6 Router Solicitation
Feb 29 16:06:15 [dhcpcd] ppp0: sendmsg: Network is unreachable
Feb 29 16:06:15 [dhcpcd] ppp0: no IPv6 Routers available
ifconfig
eth0 Link encap:Ethernet HWaddr 00:50:8d:91:74:32
inet addr:10.64.117.112 Bcast:10.64.117.255 Mask:255.255.254.0
inet6 addr: fe80::250:8dff:fe91:7432/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:44327 errors:0 dropped:0 overruns:0 frame:0
TX packets:33174 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:33294650 (31.7 MiB) TX bytes:5057050 (4.8 MiB)
Interrupt:44 Base address:0x4000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:48 errors:0 dropped:0 overruns:0 frame:0
TX packets:48 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2400 (2.3 KiB) TX bytes:2400 (2.3 KiB)
ppp0 Link encap:Point-to-Point Protocol
inet addr:91.203.66.* P-t-P:10.100.0.* Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1460 Metric:1
RX packets:4 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:40 (40.0 B) TX bytes:46 (46.0 B)
Вижу vpn поднялась. Проверяю маршруты:
route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.100.0.* 0.0.0.0 UG 0 0 0 ppp0
0.0.0.0 10.64.117.254 0.0.0.0 UG 202 0 0 eth0
10.64.116.0 0.0.0.0 255.255.254.0 U 202 0 0 eth0
10.100.0.* 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
cat /etc/resolv.conf
# Generated by resolvconf
search garanta.ru
nameserver 91.203.64.*
Все вроде наместе. Однако не пингуется
ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
ping 91.203.64.*
PING 91.203.64.2 (91.203.64.2) 56(84) bytes of data.