xelerance / xl2tpd

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

PPPD returns no such device error while establishing XL2TPD over PPPoE #225

Open AnjanaRajan97 opened 2 years ago

AnjanaRajan97 commented 2 years ago

Hi Team, We are trying to establish an XL2TPD connection between a linux machine and an embedded linux board. The embedded linux board uses Linux Kernel Version 4.19. The Linux Machine is running on Ubuntu 18.04. There is already a PPPoE connection between the Linux Machine and the Board, providing IP to the Board. The idea is to implement XL2TPD over PPPoE. Currently we are running XL2TPD without IPsec support.

image

  1. Versions XL2TPD :- 1.3.14 PPPD :- 2.4.8 PPPoE :- 3.12

*In both Linux Machine and Board we are running as root

  1. Commands used for connecting to LNS from LAC sudo xl2tpd -c /etc/xl2tpd/xl2tpd.conf -C /var/run/xl2tpd/l2tp-control sudo xl2tpd-control add l2tp lns= sudo xl2tpd-control add l2tp local ip= sudo xl2tpd-control connect l2tp -------> Username and Password stored in /etc/ppp/chap-secrets

  2. Configuration in LNS

    • /etc/xl2tpd/xl2tpd.conf [global] ; Global parameters: port = 1701 ; Bind to port 1701 access control = no ; Refuse connections without IP match [lns default] ; Our fallthrough LNS definition ip range = 192.168.4.53-192.168.4.60 ; Allocate from this IP range local ip = 192.168.4.52 ; Our local IP to use require chap = yes ; Require CHAP auth. by peer refuse pap = yes ; Refuse PAP authentication name = <user mentioned in /etc/ppp/chap-secrets> ; Report this as our hostname pppoptfile = /etc/ppp/options.xl2tpd ; ppp options file
  1. Configuration in LAC
    • /etc/xl2tpd/xl2tpd.conf [global] ; Global parameters: port = 1701 ; Bind to port 1701 access control = no ; Refuse connections without IP match [lac Xl2tp_host] ; Another quick LAC lns = ; * Required, but can take from default require authentication = no pppoptfile = /etc/ppp/options.xl2tpd
  1. IPtable Rules added for XL2TPD iptables -I INPUT -p udp --dport 1701 -j ACCEPT

  2. XL2TPD Logs from LNS Listening on IP address 0.0.0.0, port 1701 Connection established to 172.32.50.1, 1701. Local: 22865, Remote: 62009 (ref=0/0). LNS session is 'default' control_finish: Warning: Peer did not specify transmit speed Call established with 172.32.50.1, Local: 8, Remote: 7794, Serial: 1 using channel 17 Using interface ppp1 Connect: ppp1 <--> /dev/pts/1 rcvd [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x816a3a4c>] sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x34d9f77c> ] sent [LCP ConfNak id=0x1 ] rcvd [LCP ConfReq id=0x2 <asyncmap 0x0> <magic 0x816a3a4c>] sent [LCP ConfAck id=0x2 <asyncmap 0x0> <magic 0x816a3a4c>] rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x34d9f77c> ] ioctl(SIOCSIFMTU): No such device (line 1243) sent [LCP EchoReq id=0x0 magic=0x34d9f77c] sent [CHAP Challenge id=0x4c <39ad28dd6d86e73670b9ed66936ebfc322603c20>, name = "Xl2tp_host"] rcvd [CHAP Challenge id=0x79 , name = "Xl2tp_host"] sent [CHAP Response id=0x79 , name = "Xl2tp_host"] rcvd [LCP EchoReq id=0x0 magic=0x816a3a4c] sent [LCP EchoRep id=0x0 magic=0x34d9f77c] rcvd [CHAP Response id=0x4c , name = "Xl2tp_host"] sent [CHAP Success id=0x4c "Access granted"] rcvd [LCP EchoRep id=0x0 magic=0x816a3a4c] rcvd [CHAP Success id=0x79 "Access granted"] CHAP authentication succeeded: Access granted CHAP authentication succeeded sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 192.168.4.0>] rcvd [IPCP ConfReq id=0x1 <addr 0.0.0.0>] sent [IPCP ConfRej id=0x1 <addr 0.0.0.0>] rcvd [IPCP ConfRej id=0x1 <compress VJ 0f 01>] sent [IPCP ConfReq id=0x2 <addr 192.168.4.0>] rcvd [IPCP ConfReq id=0x2 <addrs 0.0.0.0 0.0.0.0>] sent [IPCP ConfRej id=0x2 <addrs 0.0.0.0 0.0.0.0>] rcvd [IPCP ConfAck id=0x2 <addr 192.168.4.0>] rcvd [IPCP ConfReq id=0x3] sent [IPCP ConfAck id=0x3] Could not determine remote IP address: defaulting to 10.64.64.65 ioctl(SIOCSIFADDR): No such device (line 2630) Interface configuration failed Couldn't get PPP statistics: No such device ioctl (SIOCGIFFLAGS): No such device (line 2587) ioctl(SIOCSIFADDR): No such device (line 2750) sent [IPCP TermReq id=0x3 "Interface configuration failed"] rcvd [IPCP TermReq id=0x4 "Could not determine local IP address"] sent [IPCP TermAck id=0x4] rcvd [IPCP TermAck id=0x3] Couldn't get PPP statistics: No such device sent [LCP TermReq id=0x2 "No network protocols running"] rcvd [LCP TermReq id=0x3 "No network protocols running"] sent [LCP TermAck id=0x3] rcvd [LCP TermAck id=0x2] Connection terminated.

We have tried the above setup and configuration between two virtual machines running on Ubuntu 18.04 and were able to successfully establish XL2TPD over PPPoE. Any suggestions or help would be much appreciated.