A few years ago, I became fed up with my ISP-provided modem-router combo due to lagginess, sluggish DNS, and overall untrustworthiness. I ended up purchasing a Linksys WRT1900 and flashing it with dd-wrt, which chugged along happily for a couple years. However, later in its life, the router would sometimes stop responding, and lazily I would simply reboot it. Slowly, this pattern started occurring more and more frequently, up until the end of its life.
I decided to make a change. I had been using OpenBSD and Freebsd on and off for a better part of ten years, and I figured it was about time to move to a router that I could trust.
The project to develop my own OpenBSD router ended up being so enjoyable, that I am still working on the project today. Slowly fine-tuning and developing various features for myself, and the small handful of people for whom I am running routers for. One big hurdle when I first started this router project, was getting OpenBSD to connect over my ISP’s pppoe connection.
I spent a good couple of days researching how to configure a pppoe connection on OpenBSD, and in the end, my config ended up looking like what is shown below. My router has been happily chugging along now for over a year, and through various revisions and reinstalls, has continued to provide a rock-solid internet connection to me and my house.
inet 0.0.0.0 255.255.255.255 NONE \ pppoedev em0 authproto pap \ authname 'firstname.lastname@example.org' authkey 'mypassword' up dest 0.0.0.1 !/sbin/route add default -ifp pppoe0 0.0.0.1
Now there other plenty of other scripts and configs that are used to ensure that the connection stays up. One such script can be found here, which is a simple ifstated config that watches the egress link.
Has been tested on OpenBSD 6.4