xelerance / xl2tpd

Official Xelerance fork of L2TPd
GNU General Public License v2.0
527 stars 203 forks source link

Network error on OpenWRT #168

Open adililhan opened 5 years ago

adililhan commented 5 years ago

Hi,

OpenWRT Version: 18.06.1 xl2tpd version: xl2tpd-1.3.12 uname -a: Linux OpenWrt 4.9.120 #0 Thu Aug 16 07:51:15 2018 mips GNU/Linux

I've installed xl2tpd on my OpenWRT router. I've configured the xl2tpd. However, it doesn't connect to my server. I'm absolutely sure the credentials are correct. The credentials are working fine on my computer.

Some outputs:

cat /etc/xl2tpd/xl2tp-secrets:

* * SERVER_SHARED_KEY_HERE

cat /etc/xl2tpd/xl2tpd.conf

[global]
port = 1701
auth file = /etc/xl2tpd/xl2tp-secrets
access control = no

[lns default]
ip range = 192.168.1.128-192.168.1.254
local ip = 192.168.1.99
length bit = yes
require chap = yes
refuse pap = yes
require authentication = yes
name = VersaLink
ppp debug = yes
pppoptfile = /etc/ppp/options.xl2tpd

cat /etc/config/network

 config interface 'thel2tp'
    option proto 'l2tp'
    option server 'L2TP_SERVER_IP'
    option username 'MY_USER'
    option password 'MY_PASS'
    option defaultroute '0'
    option keepalive 12
    option mtu 1410

When I start the L2TP service I get this error:

 daemon.notice xl2tpd[1180]: Maximum retries exceeded for tunnel 22298.  Closing.
 daemon.info xl2tpd[1180]: Connection 0 closed to L2TP_SERVER_IP, port 1701 (Timeout)
 daemon.debug xl2tpd[1180]: Unable to deliver closing message for tunnel 22298. Destroying anyway.

When I start the L2TP service I get this error sometimes:

xl2tpd: message repeated 3 times: [ udp_xmit failed to L2TP_SERVER_IP with err=-1:No such device]

This error sounds familiar with #147.

Is there any idea regarding this problem?

shussain commented 5 years ago

@adililhan it looks like you are using both lns and lac setting in your xl2ptd.conf and it appears commented out. Is that correct? Or is there an error in the copy/paste?

adililhan commented 5 years ago

@shussain sorry, I copied and pasted the original file's content. I updated the question with my own file. I couldn't find a documentation how xl2tpd works on OpenWRT. I followed this page: https://linux.die.net/man/5/xl2tpd.conf

So, I'm not sure how does LAC section work. Thank you for your help @shussain

shussain commented 5 years ago

Can you please provide your /etc/ppp/options.xl2tpd

I am assuming your error message is the same?

adililhan commented 5 years ago
root@OpenWrt:~# cat /etc/ppp/options.xl2tpd
#
noauth
debug
dump
logfd 2
logfile /var/log/xl2tpd.log
noccp
novj
novjccomp
nopcomp
noaccomp
mtu 1400
mru 1400
require-mschap-v2
lcp-echo-interval 20
lcp-echo-failure 5
connect-delay 5000
nodefaultroute
noipdefault
proxyarp

Yes, the error message is the same.