How to configure a PPPoE internet connection on a Debian box

Assuming your computer has a direct connection (with no router between it and the DSL modem), the configuration is pretty straightforward.
Here’s the tutorial for beginners:
Login and elevate your permissions to ‘super user’:


Make sure the resolvconf package is installed:

apt-get install resolvconf

Create the directory /usr/etc/ppp:

mkdir -p /usr/etc/ppp

Open your favorite editor (I’m using vi/vim here, so some commands are specific to that editor, like ‘vi’ to use the editor and ‘ :wq’ to write and close. Edit; You may find the Nano editor easier to use), create a new file and enter as many OpenNIC nameserver IPs as you like in, your nearest ones are here.

vi /usr/etc/ppp/resolv.conf.opennic

Enter the following: (The IPs shown here are German, you would probably want the nearest servers to you).

nameserver 2a00:e10:1000:10:1586:0:33:53

Write and save the file


Note: The “rotate” option helps dividing the requests between the nameservers listed.
Create the following little script:

vi /etc/ppp/ip-up.d/zzz_opennic_resolvconf
# some providers insist on the 'usepeerdns' option, hence
# we reinitialize the resolver to opennic servers after
# all is done. this hook script will be run automatically by
# pppd after it successfully established a connection.
set -e
# before we start: if anything went wrong with pppd, the $PPP...
# variables will not exist.
test -n "$PPP_IFACE" || exit 0
# Logging: use /var/log/ppp-ipupdown.log if it exists (then it is open
# for writing, see ../ip-up). Else use syslog:
blather () {
    local whereto
    if [ -e /var/log/ppp-ipupdown.log ]; then
        whereto="echo $0: $@"
        whereto="logger -i -t $0 $@"
    eval $whereto
# the file we just created:
test -f $SYSTEM_RCONF || { blather "$SYSTEM_RCONF does not exist. Exiting."; exit 0; }
test -f $LOCAL_RCONF || { blather "$LOCAL_RCONF does not exist. Exiting."; exit 0; }
cat $LOCAL_RCONF | /sbin/resolvconf -a $PPP_IFACE
blather "Resolver configured for OpenNIC namespace."

Write and save the file


Make the script executable

chmod 0755 /etc/ppp/ip-up.d/zzz_opennic_resolvconf

Restart your network:

/etc/init.d/networking restart

And that’s it!