R
R
Rabot9ga2014-04-12 23:47:50
linux
Rabot9ga, 2014-04-12 23:47:50

Problem with internet via l2TP on home server under ubuntu server 12.04?

Given: Internet via L2tp dual access from Columbia Telecom, connected to the server. In the local network, a router as a WiFi access point and one computer. The Internet is connected to eth0, locale eth1.
Problem: The ppp0 interface falls off with increasing returns to the Internet, most often occurs when the torrent is actively working. When connecting the Internet directly to a local computer with Windows, the torrent with the same settings works fine.

/etc/network/interfaces

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp
up route add 83.167.66.16 gw 10.131.61.1  dev eth0 || true

up route add -net 83.167.64.0/19 gw 10.131.61.1 dev eth0 || true
up route add -net 10.0.0.0/8 gw 10.131.61.1 dev eth0 || true

auto eth1
iface eth1 inet static
address 192.168.0.2
netmask 255.255.255.0
post-up /etc/nat


/etc/nat

#!/bin/sh

#Разрешаем доступ из внутренней сети наружу
iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT
iptables -A FORWARD -i eth1 -o ppp0 -j ACCEPT

#Включаем NAT
iptables -t nat -A POSTROUTING -o eth0 -s 192.168.0.0/24 -j MASQUERADE
iptables -t nat -A POSTROUTING -o ppp0 -s 192.168.0.0/24 -j MASQUERADE

#Разрешаем ответы из внешней сети
iptables -A FORWARD -i ppp0 -m state --state ESTABLISHED,RELATED -j ACCEPT

#Запрещаем доступ снаружи во внутреннюю сеть
iptables -A FORWARD -i ppp0 -o eth1 -j REJECT


/etc/xl2tpd/xl2tpd.conf

[lac nextone]
lns = l2tp.coltel.ru
redial = yes
redial timeout = 30
require chap = yes
require authentication = no
name = *****
ppp debug = yes
pppoptfile = /etc/ppp/options.l2tp
require pap = no
autodial = yes
rx bps = 100000000
tx bps = 100000000


/etc/ppp/options.l2tp

lock
noauth
nobsdcomp
nodeflate
nopcomp
noaccomp
nomppe
refuse-eap
refuse-pap
mru 1400
mtu 1400
name *****
remotename nextone
ipparam nextone
connect /bin/true
nopersist
maxfail 999
defaultroute
replacedefaultroute
unit 0


route-n

Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0         0.0.0.0         0.0.0.0         U     0      0        0 ppp0
10.0.0.0        10.131.61.1     255.0.0.0       UG    0      0        0 eth0
10.131.61.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
83.167.64.0     10.131.61.1     255.255.224.0   UG    0      0        0 eth0
83.167.65.0     10.131.61.1     255.255.255.0   UG    0      0        0 eth0
83.167.66.0     10.131.61.1     255.255.255.224 UG    0      0        0 eth0
83.167.66.16    10.131.61.1     255.255.255.255 UGH   0      0        0 eth0
83.167.66.16    0.0.0.0         255.255.255.255 UH    0      0        0 ppp0
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1


With an increase in the load "on return", xl2tp swears in the logs:
grep xl2tp /var/log/syslog

Apr 13 00:33:32 ubuntu xl2tpd[1223]: udp_xmit failed to 83.167.66.16:1701 with err=-1:Resource temporarily unavailable
Apr 13 00:35:04  xl2tpd[1223]: last message repeated 123 times


like this a few times, then ppp0 falls off.
drops on eth0 appear in ifconfig

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kostya Saburov, 2014-11-26
@c13

I think the problem is with the provider's servers. Many are now abandoning l2tp due to its instability and resource requirements.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question