A couple weeks ago I read an article about a guy who set up a caching DNS server for his home network on a Raspberry Pi. The main thrust of the article was, “Hey, checkitout, Cloudflare has a public DNS at 18.104.22.168 and they pinky-swear promise not to write down what IP address originated the resolution request for wombatporn.com or even overthrowthegovernment.com,” but it did get me thinking about the Pi.
Until reading that article, I thought of the Pi as being a cool (I guess) thing if you wanted to build a robot (to do some dumb thing that I don’t wanna do) or if you wanted to let people on the Internet control your irrigation system (what could possibly go wrong?) but that was just my misunderstanding. The cool thing about the Pi is that it’s a super low-power actual computer running an actual operating system that you can use, and it costs hardly anything.
So, I bought a Pi Zero-W and installed bind on it. Ever since the FCC decided that it’s okay for ISPs to provide different service levels to sites based on their whim, I’ve been thinking about how that really hoses applications that depend on the network being always on. So that got me thinking about store-and-forward and periodic connections to the Internet (psst, there’s this awesome thing called “mosh” that’s pretty cool) and inevitably that raises other questions like, “Who’s looking at your traffic,” and, “What if you don’t want your hotel to be providing all your packets to GCHQ?”
Well, I thought and poked and installed OpenVPN on the Pi and, third time around*, got a configuration that lets my laptop connect. However, it doesn’t seem to route traffic properly (at all) and I was never a network engineer. This is going to be a heck of a learning experience.
* It turns out that the micro-USB port on the Pi Zero-W doesn’t actually work. I tried several different connectors on it and nope, keyboard and mouse didn’t work. So I got to do a complete headless setup and spend an afternoon debugging that. Then, the first time around with OpenVPN, the server would start up and then immediately shut down again. Then, the server would start up but the client’s certificate somehow didn’t match what the server expected, so the connection would fail. Regenerate the client, turn off some options in the server, and finally it all connects, but the Internet isn’t reachable over the tunnel. Well, maybe it’ll be better when I’m not on the network I’m tunneling to.