PINE64
Default Debian - How to change DNS - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=111)
+--- Forum: Linux on Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=114)
+--- Thread: Default Debian - How to change DNS (/showthread.php?tid=9173)



Default Debian - How to change DNS - cocozozo - 02-14-2020

Hi there,

I would like some guidance on how to change the dns with the default Debian install on the Pinebook Pro.
Changing it within the GUI doesn’t seem to stick.
I’m trying to point the PBP to my pihole address.
I have also noticed “ip route” lists two wlan.


RE: Default Debian - How to change DNS - xmixahlx - 02-14-2020

i'm guessing you want to edit connections in network manager to make customizations. however... you could just have pihole be your DHCP server instead.


RE: Default Debian - How to change DNS - rleasle - 02-15-2020

If you're getting your IP from a DHCP server, that usually sets your DNS for you as well. If you control that DHCP service (e,g, cable modem) you can configure it to serve the DNS you want.


RE: Default Debian - How to change DNS - cocozozo - 02-15-2020

Hi guys,

Thank you for the responses.
Yes I am editing dns connections through the network manager but this is not working.
I have considered using DHCP server with pihole instead of my asus router but have refrained as I have about 30 or so devices connected (smart home plugs etc) with assigned IPs.
It is a little confusing but when I assign my pihole ip to the routers dns it works but I don't get individual information about each connected device. I have always manually assigned laptops, iphones etc to my pihole.
I think i'll just back up my routers settings and try using my pihole for DHCP server.
Also note when I have used manjaro on the pinebookpro I point the dns settings to the pihole and it works as expected.

Cheers


RE: Default Debian - How to change DNS - xmixahlx - 02-16-2020

you could set pihole as your dns server on your router.


RE: Default Debian - How to change DNS - ab1jx - 02-18-2020

The DNS server traditionally ends up in /etc/resolv.conf, with modern-day Debian it's in /var/run/NetworkManager/resolv.conf. Mostly I've removed wi_cd and NetworkManager because they're unreliable.

I've never used a Pihole, just hosts files that trap advertising URLs into 127.0.0.1. ip route is different than DNS, it should show the shortest path to the internet (try typing just route at a terminal). DNS is Domain Name Service, it looks up URLs and converts them to numbers (IP addresses). For Pihole to work though it needs to be in your route, possibly as a gateway, so it filters by redirecting the ad URLs. Several machines can connect to it, you could even tie hostapd to it and make it into a filtered WiFi AP. Then something else needs to be the gateway for the Pihole machine, maybe your real router.

I'm using EasyTether which is an Android app and a Linux program on my Pi. So EasyTether's IP of 192.168.117.1 is my gateway. I manually copied a bunch of ad URLs from a hosts file AdAway set up on my phone, that does the ad blocking. Then i used the scheme at https://pimylifeup.com/raspberry-pi-wireless-access-point/ which uses hostapd, dnsmasq and iptables so my WiFi network is on 192.168.1.0/24. And this Pi serves internet over WiFi to the whole house.

A decent free public DNS server is 8.8.8.8 which is run by Google. But machines on your network probably want to use the machine with dnsmasq because when it hands out an IP to a DCHP request it will also put that machine's hostname and IP into its DNS cache. So you can hit your local machines with a URL like http://upstairs/index.html. Ssh and ftp amongst your local machines works very nicely using machine hostnames instead of IP addresses or maintaining hosts files like with static IPs.