3

I am trying to setup a PPPoE server in my ubuntu 14.04 system for testing purposes. The Server and the client both have Ubuntu 14.04 installed. I have followed the guide from this website to setup the server.

http://www.howtodoityourself.org/pppoe-server-how-to-do-it-yourself.html

This is my interfaces file:

# The loopback network interface
auto lo
iface lo inet loopback

# The WAN network interface
auto eth0


# The LAN network interface
auto eth1
iface eth1 inet static
        address 192.168.1.254
        netmask 255.255.255.0

My Nameserver:

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.1.1
nameserver 8.8.8.8
nameserver 8.8.4.4

The chap secret file:

# Secrets for authentication using CHAP
# client    server  secret          IP addresses
"russo"     *   "1234"          192.168.1.1

The PPPoE Server options file:

# PPP options for the PPPoE server
# LIC: GPL
require-chap
login
lcp-echo-interval 10
lcp-echo-failure 2
ms-dns 8.8.8.8
ms-dns 8.8.4.4
netmask 255.255.255.0
defaultroute
noipdefault
usepeerdns

Ip addresses pool file:

192.168.1.1-20

Then when I run the PPPoE server by executing the following command:

sudo pppoe-server -C isp -L 192.168.1.254 -p /etc/ppp/allip -I eth1

and setup NAT

sudo iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -o eth0 -j MASQUERADE

then I connect my client using the command

sudo pppoeconf

on the server side this is what my netstat looks like:

mr@OptiPlex-760:~$ netstat -pr
Kernel-IP-Routentabelle
Ziel            Router          Genmask         Flags   MSS Fenster irtt Iface
default         router          0.0.0.0         UG        0 0          0 eth0
link-local      *               255.255.0.0     U         0 0          0 eth1
192.168.1.0     *               255.255.255.0   U         0 0          0 eth1
192.168.88.0    *               255.255.255.0   U         0 0          0 eth0

This is a part of syslog file:

Jul 10 08:54:35 OptiPlex-760 NetworkManager[987]: <warn> /sys/devices/virtual/net/ppp0: couldn't determine device driver; ignoring...
Jul 10 08:54:35 OptiPlex-760 pppd[4644]: Using interface ppp0
Jul 10 08:54:35 OptiPlex-760 pppd[4644]: Connect: ppp0 <--> /dev/pts/0
Jul 10 08:55:06 OptiPlex-760 pppd[4644]: Peer russo failed CHAP Session verification
Jul 10 08:55:06 OptiPlex-760 pppd[4644]: Connection terminated.
Jul 10 08:55:06 OptiPlex-760 NetworkManager[987]:    SCPlugin-Ifupdown: devices removed (path: /sys/devices/virtual/net/ppp0, iface: ppp0)
Jul 10 08:55:06 OptiPlex-760 pppoe[4647]: read (asyncReadFromPPP): Session 7: Input/output error
Jul 10 08:55:06 OptiPlex-760 pppd[4644]: Exit.
Jul 10 08:55:06 OptiPlex-760 pppoe-server[4315]: Session 7 closed for client 68:b5:99:f2:b8:bc (192.168.1.7) on eth1
Jul 10 08:55:06 OptiPlex-760 pppoe-server[4315]: Sent PADT
Jul 10 08:55:24 OptiPlex-760 pppoe-server[4695]: Session 1 created for client 68:b5:99:f2:b8:bc (192.168.1.1) on eth1 using Service-Name ''
Jul 10 08:55:24 OptiPlex-760 pppd[4695]: pppd 2.4.5 started by root, uid 0
Jul 10 08:55:24 OptiPlex-760 pppd[4695]: Using interface ppp0
Jul 10 08:55:24 OptiPlex-760 pppd[4695]: Connect: ppp0 <--> /dev/pts/0
Jul 10 08:55:24 OptiPlex-760 NetworkManager[987]:    SCPlugin-Ifupdown: devices added (path: /sys/devices/virtual/net/ppp0, iface: ppp0)
Jul 10 08:55:24 OptiPlex-760 NetworkManager[987]:    SCPlugin-Ifupdown: device added (path: /sys/devices/virtual/net/ppp0, iface: ppp0): no ifupdown configuration found.
Jul 10 08:55:24 OptiPlex-760 NetworkManager[987]: <warn> /sys/devices/virtual/net/ppp0: couldn't determine device driver; ignoring...
Jul 10 08:55:37 OptiPlex-760 pppoe-server[4707]: Session 3 created for client 68:b5:99:f2:b8:bc (192.168.1.3) on eth1 using Service-Name ''
Jul 10 08:55:37 OptiPlex-760 pppd[4707]: pppd 2.4.5 started by root, uid 0
Jul 10 08:55:37 OptiPlex-760 NetworkManager[987]:    SCPlugin-Ifupdown: devices added (path: /sys/devices/virtual/net/ppp1, iface: ppp1)
Jul 10 08:55:37 OptiPlex-760 NetworkManager[987]:    SCPlugin-Ifupdown: device added (path: /sys/devices/virtual/net/ppp1, iface: ppp1): no ifupdown configuration found.
Jul 10 08:55:37 OptiPlex-760 NetworkManager[987]: <warn> /sys/devices/virtual/net/ppp1: couldn't determine device driver; ignoring...
Jul 10 08:55:37 OptiPlex-760 pppd[4707]: Using interface ppp1
Jul 10 08:55:37 OptiPlex-760 pppd[4707]: Connect: ppp1 <--> /dev/pts/11
mr@OptiPlex-760:~$ 

On my client side, if i check the plog, I see:

muhammadarifurrahman@wm-HP-EliteBook-2540p:~$ plog
Jul 10 08:44:15 wm-HP-EliteBook-2540p pppd[5366]: PPP session is 1
Jul 10 08:44:15 wm-HP-EliteBook-2540p pppd[5366]: Connected to 60:e3:27:05:37:78 via interface eth0
Jul 10 08:44:15 wm-HP-EliteBook-2540p pppd[5366]: Using interface ppp0
Jul 10 08:44:15 wm-HP-EliteBook-2540p pppd[5366]: Connect: ppp0 <--> eth0
Jul 10 08:44:18 wm-HP-EliteBook-2540p pppd[5366]: CHAP authentication succeeded: Access granted
Jul 10 08:44:18 wm-HP-EliteBook-2540p pppd[5366]: CHAP authentication succeeded
Jul 10 08:44:18 wm-HP-EliteBook-2540p pppd[5366]: peer from calling number 60:E3:27:05:37:78 authorized
muhammadarifurrahman@wm-HP-EliteBook

And this is my netstat -pr:

muhammadarifurrahman@wm-HP-EliteBook-2540p:~$ netstat -pr
Kernel-IP-Routentabelle
Ziel            Router          Genmask         Flags   MSS Fenster irtt Iface
muhammadarifurrahman@wm-HP-EliteBook-2540p:~$

I am not sure what I am doing wrong. Any suggestions is highly appreciated.

This is the ifconfig -a result from server side (at the beginning):

    mr@OptiPlex-760:~$ ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:23:ae:7d:f1:07  
          inet addr:192.168.88.249  Bcast:192.168.88.255  Mask:255.255.255.0
          inet6 addr: fe80::223:aeff:fe7d:f107/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:669 errors:0 dropped:0 overruns:0 frame:0
          TX packets:758 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:205085 (205.0 KB)  TX bytes:104319 (104.3 KB)
          Interrupt:21 Memory:febe0000-fec00000 

eth1      Link encap:Ethernet  HWaddr 60:e3:27:05:37:78  
          inet addr:192.168.1.254  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::62e3:27ff:fe05:3778/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:72 errors:0 dropped:3 overruns:0 frame:0
          TX packets:61 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:6967 (6.9 KB)  TX bytes:6664 (6.6 KB)

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:65536  Metric:1
          RX packets:387 errors:0 dropped:0 overruns:0 frame:0
          TX packets:387 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:32845 (32.8 KB)  TX bytes:32845 (32.8 KB)

ppp0      Link encap:Point-to-Point Protocol  
          POINTOPOINT NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:3 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3 
          RX bytes:66 (66.0 B)  TX bytes:0 (0.0 B)

ppp1      Link encap:Point-to-Point Protocol  
          POINTOPOINT NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:1 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3 
          RX bytes:22 (22.0 B)  TX bytes:0 (0.0 B)

mr@OptiPlex-760:~$ 

Then i ran plog on server side and saw:

mr@OptiPlex-760:~$ plog
Jul 10 11:23:23 OptiPlex-760 pppd[2774]: Peer russo failed CHAP Session verification
Jul 10 11:23:23 OptiPlex-760 pppd[2774]: Connection terminated.
Jul 10 11:23:23 OptiPlex-760 pppd[2774]: Exit.

Then ran ifconfig -a again:

mr@OptiPlex-760:~$ ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:23:ae:7d:f1:07  
          inet addr:192.168.88.249  Bcast:192.168.88.255  Mask:255.255.255.0
          inet6 addr: fe80::223:aeff:fe7d:f107/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:685 errors:0 dropped:0 overruns:0 frame:0
          TX packets:782 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:206458 (206.4 KB)  TX bytes:106269 (106.2 KB)
          Interrupt:21 Memory:febe0000-fec00000 

eth1      Link encap:Ethernet  HWaddr 60:e3:27:05:37:78  
          inet addr:192.168.1.254  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::62e3:27ff:fe05:3778/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:106 errors:0 dropped:4 overruns:0 frame:0
          TX packets:87 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:9081 (9.0 KB)  TX bytes:7945 (7.9 KB)

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:65536  Metric:1
          RX packets:409 errors:0 dropped:0 overruns:0 frame:0
          TX packets:409 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:34067 (34.0 KB)  TX bytes:34067 (34.0 KB)

mr@OptiPlex-760:~$

This is the ifconfig -a result from client side:

    muhammadarifurrahman@wm-HP-EliteBook-2540p:~$ ifconfig -a
eth0      Link encap:Ethernet  HWaddr 68:b5:99:f2:b8:bc  
          inet addr:192.168.88.250  Bcast:192.168.88.255  Mask:255.255.255.0
          inet6 addr: fe80::6ab5:99ff:fef2:b8bc/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:98 errors:0 dropped:0 overruns:0 frame:0
          TX packets:212 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:10413 (10.4 KB)  TX bytes:24738 (24.7 KB)
          Interrupt:20 Memory:d4700000-d4720000 

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:65536  Metric:1
          RX packets:194 errors:0 dropped:0 overruns:0 frame:0
          TX packets:194 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:27708 (27.7 KB)  TX bytes:27708 (27.7 KB)

ppp0      Link encap:Point-to-Point Protocol  
          POINTOPOINT NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3 
          RX bytes:0 (0.0 B)  TX bytes:22 (22.0 B)

wlan0     Link encap:Ethernet  HWaddr 58:94:6b:55:15:04  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

muhammadarifurrahman@wm-HP-EliteBook-2540p:~$ 

I have just noticed this:

When I start PPPoE on the server and then connect from the client,

On the serveside I get:

mr@OptiPlex-760:~$ plog
Jul 10 11:33:05 OptiPlex-760 pppd[3257]: pppd 2.4.5 started by root, uid 0
Jul 10 11:33:05 OptiPlex-760 pppd[3257]: Using interface ppp0
Jul 10 11:33:05 OptiPlex-760 pppd[3257]: Connect: ppp0 <--> /dev/pts/10

And on the client side I get:

muhammadarifurrahman@wm-HP-EliteBook-2540p:~$ plog
Jul 10 11:21:59 wm-HP-EliteBook-2540p pppd[4258]: CHAP authentication succeeded: Access granted
Jul 10 11:21:59 wm-HP-EliteBook-2540p pppd[4258]: CHAP authentication succeeded
Jul 10 11:21:59 wm-HP-EliteBook-2540p pppd[4258]: peer from calling number 60:E3:27:05:37:78 authorized

Then after 2-3 seconds, on the server side i get:

mr@OptiPlex-760:~$ plog
Jul 10 11:33:18 OptiPlex-760 pppd[3257]: Peer russo failed CHAP Session verification
Jul 10 11:33:18 OptiPlex-760 pppd[3257]: Connection terminated.
Jul 10 11:33:18 OptiPlex-760 pppd[3257]: Exit.
mr@OptiPlex-760:~$

And on the client side:

Jul 10 11:22:09 wm-HP-EliteBook-2540p pppd[4258]: LCP terminated by peer (Authentication failed)
Jul 10 11:22:09 wm-HP-EliteBook-2540p pppd[4258]: Modem hangup
Jul 10 11:22:09 wm-HP-EliteBook-2540p pppd[4258]: Connection terminated.
Jul 10 11:22:09 wm-HP-EliteBook-2540p pppd[4258]: Failed to disconnect PPPoE socket: 114 Operation already in progress
muhammadarifurrahman@wm-HP-EliteBook-2540p:~$ 
1

Ok so I have fixed the problem by modifying the PPoE Server options file. This is how it looks like now:

auth
lcp-echo-failure 3
lcp-echo-interval 60
mtu 1482
mru 1482
require-chap
ms-dns 8.8.8.8
ms-dns 8.8.4.4
netmask 255.255.255.0
defaultroute
noipdefault
usepeerdns

And everything is working perfectly.

-2

This is your error: "Jul 10 08:55:06 OptiPlex-760 pppd[4644]: Peer russo failed CHAP Session verification" - is the user/pass correctly set on the client? Did you put anything in the server name? you should have a * so it can connect to any server.

  • Thank you for your reply. I have a * on my chap secrets file. The username and password is set correctly on the client. I have added the chap secret file on the main post. please check it there. – Russo Jul 10 '17 at 8:13
  • Please porform an ifconfig -a on both machines and post the output here. (after you initiate the pppoe connection) – HowToDoItYourself Jul 10 '17 at 8:41
  • I have added to the main post. please check. – Russo Jul 10 '17 at 8:50
  • On the server side I am still getting Peer XXX failed verification, but on the client side I get CHAP authentication succeded. – Russo Jul 10 '17 at 8:53
  • sorry the language is in german. i will change the language and post again. – Russo Jul 10 '17 at 9:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.