Configure PPPoE DSL Connection on Arch Linux/Manjaro with pppoe-setup
Most ISPs (Internet Service Providers) offer multiple dynamic IP addresses and even come with a static one. To take advantage of that, we'll be setting up a PPPoE (Point-to-Point Protocol over Ethernet) DSL (Digital Subscriber Line) connection on our own machine to obtain an independent IP address.
And just like pppoeconf
from Debian/Ubuntu, Arch Linux/Manjaro has its own preferred ways to configure a PPPoE connection. This guide refers to Direct modem connection on ArchWiki. We'll be using pppoe-setup
from package rp-pppoe
to set up the connection, and configure to dial-up at system startup.
Prerequisites
Before configuring a PPPoE connection, you need to connect your computer to your DSL modem with an Ethernet cable.
To be aware, a DSL modem is not a router (which is what most people usually get their Internet connection from) but the router is connected to it.
Install rp-pppoe
rp-pppoe
is a easy-to-use command-line tool to set up PPPoE connections. It uses ppp
under the hood and saved us a lot of trouble from configuring manually.
To install rp-pppoe
package from the official repository:
-
Using
yay
$ yay -S rp-pppoe
-
Using
pacman
(which is the default package manager of Arch Linux/Manjaro)$ sudo pacman -S rp-pppoe
Setting Up Connection
To set up the PPPoE connection:
$ sudo pppoe-setup
Then pppoe-setup
will ask you some questions about the configuration.
Configure User Name
Enter the user name provided by your ISP:
USER NAME
>>> Enter your PPPoE user name: username@yourisp.com
Output
Configure Network Interface
Enter the network interface is currently connected to your DSL modem:
INTERFACE
>>> Enter the Ethernet interface connected to the DSL modem
For Solaris, this is likely to be something like /dev/hme0.
For Linux, it will be ethn, where 'n' is a number.
(default enp0s31f6): enp0s31f6
Output
To find out the existing network interfaces:
$ ip link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp0s31f6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
link/ether d8:9e:f3:26:92:50 brd ff:ff:ff:ff:ff:ff
4: wlp1s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether 52:63:51:a0:2d:85 brd ff:ff:ff:ff:ff:ff permaddr ec:08:6b:2a:4d:a1
Output
Configure DNS
Enter the IP address of your ISP's DNS server or leave it as server
to obtain it automatically from your ISP:
DNS
Please enter the IP address of your ISP's primary DNS server.
If your ISP claims that 'the server will provide DNS addresses',
enter 'server' (all lower-case) here.
If you just press enter, I will assume you know what you are
doing and not modify your DNS setup.
>>> Enter the DNS information here: server
Output
Configure Password
Enter the password provided by your ISP:
PASSWORD
>>> Please enter your PPPoE password:
>>> Please re-enter your PPPoE password:
Output
Configure Firewall
Enter the desired firewall rules:
FIREWALLING
Please choose the firewall rules to use. Note that these rules are
very basic. You are strongly encouraged to use a more sophisticated
firewall setup; however, these will provide basic security. If you
are running any servers on your machine, you must choose 'NONE' and
set up firewalling yourself. Otherwise, the firewall rules will deny
access to all standard servers like Web, e-mail, ftp, etc. If you
are using SSH, the rules will block outgoing SSH connections which
allocate a privileged source port.
The firewall choices are:
0 - NONE: This script will not set any firewall rules. You are responsible
for ensuring the security of your machine. You are STRONGLY
recommended to use some kind of firewall rules.
1 - STANDALONE: Appropriate for a basic stand-alone web-surfing workstation
2 - MASQUERADE: Appropriate for a machine acting as an Internet gateway
for a LAN
>>> Choose a type of firewall (0-2): 0
Output
To not disturb the configuration of your firewall, I'd suggest you don't let
setup-pppoe
handle firewall settings.
Finishing Up
After double checking the configuration and accept to update /etc/ppp/pppoe.conf
, your PPPoE connection is now fully set up:
** Summary of what you entered **
Ethernet Interface: enp0s31f6
User name: username@yourisp.com
Activate-on-demand: No
DNS addresses: Supplied by ISP's server
Firewalling: NONE
>>> Accept these settings and adjust configuration files (y/n)? y
Adjusting /etc/ppp/pppoe.conf
Adjusting /etc/ppp/pap-secrets and /etc/ppp/chap-secrets
Congratulations, it should be all set up!
Type 'pppoe-start' to bring up your PPPoE link and 'pppoe-stop' to bring
it down. Type 'pppoe-status' to see the link status.
Output
To start the PPPoE connection:
$ sudo pppoe-start
. Connected!
Output
To check if the PPPoE connection is started successfully:
$ pppoe-status
pppoe-status: Link is up and running on interface ppp0
6: ppp0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1492 qdisc fq_codel state UNKNOWN mode DEFAULT group default qlen 3
link/ppp
Output
Now the network traffic is going through both Ethernet and PPP interface (in my case is enp0s31f6
and ppp0
):
Dial-Up at System Startup
By default, you'll need to manually run sudo pppoe-start
to start your PPPoE connection on every bootup. To set up automatic connection by enabling service adsl
:
$ sudo systemctl enable adsl
To check if adsl
is up and running:
$ systemctl status adsl
● adsl.service - ADSL Daemon
Loaded: loaded (/usr/lib/systemd/system/adsl.service; enabled; vendor preset: disabled)
Active: active (running) since Fri 2022-01-07 16:04:12 CST; 4s ago
Output