0

I have setup on ubuntu 18.04LTS a ppp server in a virtual machine for test puproces with the following settings:

  • /etc/ppp/pap-secrets:
#
# /etc/ppp/pap-secrets
#
# This is a pap-secrets file to be used with the AUTO_PPP function of
# mgetty. mgetty-0.99 is preconfigured to startup pppd with the login option
# which will cause pppd to consult /etc/passwd (and /etc/shadow in turn)
# after a user has passed this file. Don't be disturbed therefore by the fact
# that this file defines logins with any password for users. /etc/passwd
# (again, /etc/shadow, too) will catch passwd mismatches.
#
# This file should block ALL users that should not be able to do AUTO_PPP.
# AUTO_PPP bypasses the usual login program so it's necessary to list all
# system userids with regular passwords here.
#
# ATTENTION: The definitions here can allow users to login without a
# password if you don't use the login option of pppd! The mgetty Debian
# package already provides this option; make sure you don't change that.

# INBOUND connections

# Every regular user can use PPP and has to use passwords from /etc/passwd
*   hostname    ""  *

# UserIDs that cannot use PPP at all. Check your /etc/passwd and add any
# other accounts that should not be able to use pppd!
guest   hostname    "*" -
master  hostname    "*" -
root    hostname    "*" -
support hostname    "*" -
stats   hostname    "*" -

# OUTBOUND connections

# Here you should add your userid password to connect to your providers via
# PAP. The * means that the password is to be used for ANY host you connect
# to. Thus you do not have to worry about the foreign machine name. Just
# replace password with your password.
# If you have different providers with different passwords then you better
# remove the following line.

#   *   password
"user1" *   "user1" *
  • And /etc/ppp/pppoe-server-options has the following settings:
# PPP options for the PPPoE server
# LIC: GPL
auth
debug
#plugin /etc/ppp/plugins/rp-pppoe.so
require-pap
login
mtu 500
mru 500
ktune
proxyarp
lcp-echo-interval 10
lcp-echo-failure 2
nobsdcomp
noccp
novj
noipx 

Then I launch the pppoe server via:

sudo pppoe-server -C dummyppoe -I enp0s8 -L 10.0.0.1 -l -R 10.0.0.2 -N 265 -O /etc/ppp/pppoe-server-options

Also I have an Ubuntu 18.04LTS client in a virtualbox vm and I created a new ppp connection via this command:

nmcli con edit type pppoe con-name "Dummy PPP"

And then typed the following commands in the prompted command interface:

set pppoe.username user1
set pppoe.password user1
save
quit

And prompted the connection via the command:

sudo nmcli device connect enp0s3

But on my server /var/log/syslog I get the following errors:

May 31 11:53:27 ppp-server pppoe-server[3059]: Session 18 created for client 08:00:27:d0:71:55 (10.0.0.19) on enp0s8 using Service-Name ''
May 31 11:53:27 ppp-server pppd[3059]: pppd 2.4.7 started by user, uid 0
May 31 11:53:27 ppp-server pppd[3059]: using channel 60
May 31 11:53:27 ppp-server pppd[3059]: Using interface ppp0
May 31 11:53:27 ppp-server pppd[3059]: Connect: ppp0 <--> /dev/pts/2
May 31 11:53:27 ppp-server systemd-udevd[3061]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
May 31 11:53:27 ppp-server pppd[3059]: rcvd [LCP ConfReq id=0x1 <mru 1492> <magic 0x8877ed71>]
May 31 11:53:27 ppp-server pppd[3059]: sent [LCP ConfReq id=0x1 <mru 1492> <auth pap> <magic 0xf28cfd90>]
May 31 11:53:27 ppp-server pppd[3059]: sent [LCP ConfAck id=0x1 <mru 1492> <magic 0x8877ed71>]
May 31 11:53:27 ppp-server pppd[3059]: rcvd [LCP ConfAck id=0x1 <mru 1492> <auth pap> <magic 0xf28cfd90>]
May 31 11:53:27 ppp-server pppd[3059]: sent [LCP EchoReq id=0x0 magic=0xf28cfd90]
May 31 11:53:27 ppp-server systemd-timesyncd[603]: Network configuration changed, trying to establish connection.
May 31 11:53:27 ppp-server networkd-dispatcher[1011]: WARNING:Unknown index 63 seen, reloading interface list
May 31 11:53:27 ppp-server pppd[3059]: rcvd [PAP AuthReq id=0x1 user="user1" password=<hidden>]
May 31 11:53:27 ppp-server pppd[3059]: Initializing PAM (3) for user user1
May 31 11:53:27 ppp-server pppd[3059]: ---> PAM INIT Result = 0
May 31 11:53:27 ppp-server pppd[3059]: Attempting PAM authentication
May 31 11:53:27 ppp-server systemd-timesyncd[603]: Synchronized to time server 91.189.89.198:123 (ntp.ubuntu.com).
May 31 11:53:28 ppp-server pppd[3059]: PAM Authentication failed: 7: Authentication failure
May 31 11:53:28 ppp-server pppd[3059]: PAP peer authentication failed for user1
May 31 11:53:28 ppp-server pppd[3059]: Connection terminated.
May 31 11:53:28 ppp-server pppoe[3063]: read (asyncReadFromPPP): Session 18: Input/output error
May 31 11:53:28 ppp-server systemd-timesyncd[603]: Network configuration changed, trying to establish connection.
May 31 11:53:28 ppp-server pppd[3059]: Exit.
May 31 11:53:28 ppp-server pppoe-server[2786]: Session 18 closed for client 08:00:27:d0:71:55 (10.0.0.19) on enp0s8
May 31 11:53:28 ppp-server pppoe-server[2786]: Sent PADT
May 31 11:53:28 ppp-server pppoe-server[2786]: PADT for session 18 received from 08:00:27:D0:71:55; should be from 00:00:00:00:00:00
May 31 11:53:28 ppp-server systemd-timesyncd[603]: Synchronized to time server 91.189.89.198:123 (ntp.ubuntu.com).

Also, a packet capture of the authentication process via wireshark at the client side shows that I have entered the correct password (I know is bad showing passwords but this is an experimental setup and not a production one without any public access):

287 296.597405  PcsCompu_d0:71:55   PcsCompu_7b:9e:7b   PPP PAP 60  Authenticate-Request (Peer-ID='user1', Password='user1')

Attempt for Pap Authentication

What I did wrong?

Dimitrios Desyllas
  • 523
  • 2
  • 10
  • 27

1 Answers1

1

In order to make it work then you should create a system user as well into your ppp server as well. In your example user1 has been used then you should use the following commands as well:

sudo useradd user1
sudo passwd user1

And provide the password user1 (or any other password assuming this is an experimental setup thus I place the password as well). I haven't managed to do without system user.

An alternative approach is to remove the option login from the pppoe-server-options, this option requires to use the system's user as ppp users as well.

Dimitrios Desyllas
  • 523
  • 2
  • 10
  • 27