Default Debian - How to change DNS
#1
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.
#2
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.
#3
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.
#4
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
#5
you could set pihole as your dns server on your router.
#6
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-wire...ess-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.


Possibly Related Threads…
Thread Author Replies Views Last Post
  Official Debian support moonwalkers 64 64,527 07-08-2024, 01:40 PM
Last Post: Humid Stylus
  Debian on Pinebook Pro u974615 7 2,906 03-31-2024, 10:11 AM
Last Post: u974615
  Nethunter default password failed lamlarryyyy 0 719 11-23-2023, 02:48 AM
Last Post: lamlarryyyy
  install debian on pbp jsch 7 5,433 11-22-2023, 04:22 PM
Last Post: TRS-80
  How to mainline kernel on daniel thompson's debian installer? hellojack 14 9,874 09-07-2023, 09:38 PM
Last Post: Der Geist der Maschine
  Unable to install Debian Bullseye because of missing wifi firmware Pino64 7 5,378 07-15-2023, 02:58 PM
Last Post: u974615
Question Debian (Vanilla) no output on display after Kernel update (6.0.8-1) as365n4 1 1,661 12-09-2022, 12:43 PM
Last Post: as365n4
  Unsuccessful using danielt's unofficial Debian installer on the PBP joeDoe 2 2,942 12-09-2022, 05:04 AM
Last Post: ndp
  How can I install Debian? ImmyChan 1 2,759 10-19-2022, 03:09 AM
Last Post: alpopa
  when i close my laptop lid the screen doesn't turn on? (debian bullseye based) computerc 3 2,562 09-23-2022, 08:37 PM
Last Post: computerc

Forum Jump:


Users browsing this thread: 1 Guest(s)