Skip to content

Instantly share code, notes, and snippets.

@jwillikers
Last active April 22, 2024 21:32
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jwillikers/ab0390177dae6cd567e2efbae89a9d56 to your computer and use it in GitHub Desktop.
Save jwillikers/ab0390177dae6cd567e2efbae89a9d56 to your computer and use it in GitHub Desktop.
PPPoE Setup on OpenBSD

Setup PPPoE on OpenBSD 6.6

This brief article describes how I setup the internet connection on my PPPoE interface on OpenBSD 6.6.

PPPoE Configuration

The configuration only involves two configuration files and initializing the new network interface. I use a hostname.if file to initialize the PPPoE interface when the system boots. This example is very similar to the one provided in the PPPOE(4) manpage with two differences. First, chap replaces pap as the authentication protocal. Second, only the relevant IPv4 options are shown since my ISP doesn’t support IPv6.

/etc/hostname.pppoe0
inet 0.0.0.0 255.255.255.255 NONE \ # (1)
	pppoedev em0 authproto chap \ # (2)
	authname 'username' authkey 'password' up
dest 0.0.0.1
!/sbin/route add default -ifp pppoe0 0.0.0.1
  1. Set the IP to 0.0.0.0, a wildcard representing whatever IP the PPPoE connection provides.

  2. em0 is the ethernet interface for the router’s WAN port.

The physical em0 interface must be up.

/etc/hostname.em0
up mtu 1508

Start up the em0 and pppoe0 interfaces.

sh /etc/netstart em0 pppoe0
🔥

The /etc/netstart script was not able to successfully establish a PPPoE connection when I changed my configuration from pap to chap. I had to reboot my system after changing the configuration file for the connection to succeed.

reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment