Home » Router update

Beto Dealmeida's avatar

Router update

An update on my Linux router adventure

Updating my recent post on Setting up a Linux router in 2020. I was able to get it working, after a few hickups. I configured NetworkManager to share the internet with the interface associated with the access points. At first the connected clients didn't have access to the internet, but I noticed I had two different IPs associated to the interface, from when I had first configure Pi-hole.

Once I had internet access, Pi-hole stopped working. Turns out NetworkManager runs its own DNS server (dnsmasq) together with a DHCP server when you share a connection, and it was blocking Pi-hole from starting its own DNS server. I added a file to /etc/NetworkManager/dnsmasq-shared.d/ disabling DNS:

port=0

With this, dnsmasq is used only as a DHCP server, and Pi-hole can run its DNS server. Everything seems to be working now! I have two main internet connections, wired and 4G, and NetworkManager chooses between them, favoring wired. Both are shared with another wired connection, that goes to the access points and runs a DHCP server with IP forwarding. Clients connected to the access points use as DNS server the laptop, so that Pi-hole can block advertisement automatically.

Comments

You can engage with this post on Twitter or Webmention.