Page 1 of 1
Changing DNS 'resolvers'.....what needs editing/changing? How do we do this? [SOLVED]
Posted: Wed Feb 10, 2021 11:00 am
by mikewalsh
Morning, guys'n'gals.
Now; I know this would probably qualify as a 'Network' query, but I have a feeling if I post it there, it'll quickly get 'lost'..! So; I'm posting it here instead.
Okay. Question:- Where, precisely, in Puppy do I locate the info as to what DNS 'resolver' I'm using? Or to be more accurate, how do I go about altering my DNS provider? I'm intending to give CloudFlare's public 1.1.1.1 service a try.....supposedly the fastest/most secure, etc., etc. So, I would like to know where we change this information, networking not being one of my strong points!
Any sensible advice, help, suggestions.....all 'contributions' gratefully received.
TIA.
Mike.
Re: Changing DNS 'resolvers'.....what needs editing/changing? How do we do this?
Posted: Wed Feb 10, 2021 12:15 pm
by Dingo
@mikewalsh
I read about creating resolv.conf.head in /etc
but, pratically, I experienced that changing dns in /etc/resolv.conf is effective and works
this is content of my resolv.conf file with adguard dns settled
Code: Select all
# Generated by dhcpcd from wlan0
nameserver 94.140.14.14
nameserver 94.140.15.15domain lan
nameserver 192.168.1.254
# /etc/resolv.conf.tail can replace this line
Re: Changing DNS 'resolvers'.....what needs editing/changing? How do we do this?
Posted: Wed Feb 10, 2021 1:33 pm
by mikewalsh
@Dingo :-
Hi, mate.
I had a snout around a few sites online, mostly to do with networking an' all that stuff.
We were discussing CloudFlare over at BleepingComputer last night, and one of the guys volunteered a link to a page about CloudFlare's free public DNS service....."1.1.1.1". Being curious, I had a look, and had a read about what they offer. I then looked around a bit more; read some reviews.....and came away with the general impression that CloudFlare are very highly thought of across the industry as a whole. Seems nobody's got a bad word to say about them, and their connection speeds are ridiculously fast (and VERY secure into the bargain).
Not only that, but it seems their claims of not holding onto your data OR selling it on are substantiated. They're contracted with KPMG for transparent public auditing, twice a year, with publicly-available reports that can be downloaded & read by anyone who wants to see them.
That's NOT too shabby..!
-----------------------------------------------------
I read up a bit about using /etc/resolv.conf (AND .head & .tail),but couldn't figure out how you stop Puppy from 'overwriting' everything with your standard settings at every boot. And then I remembered that Dougal's Network Wizard had a 'static' IP utility, which allowed you to set primary & secondary DNS servers, amongst other things. So that's how I did it:-
'1.1.1.1' is CloudFlare's primary free DNS server.....and 1.0.0.1 is the secondary, or 'backup'. So far, it seems to work well; very, very fast. I would estimate maybe between 3-4 times faster than my ISP's usual choice.
It's early days yet. I'll see how it goes, and monitor performance over the next few weeks or so.
Mike.
Re: Changing DNS 'resolvers'.....what needs editing/changing? How do we do this?
Posted: Wed Feb 10, 2021 3:54 pm
by backi
Hi Folks !
Cloudflare ....really good Find ...so it seems to me.
Cool!
What i did .
Just made a little script :
#!/bin/sh
echo "nameserver 1.1.1.1" > /etc/resolv.conf
echo "nameserver 1.0.0.1" >> /etc/resolv.conf
Named it "Cloudflare Dns Server".....made it executable.......
just clicking it......makes you switch to Cloudflare Server on Demand.
After Reboot it is gone...but just clicking it......makes you switch to Cloudflare Server on Demand immediately again.
Look for etc/resolv.conf if it is working.
Hope it could be it is good for faster surfing.
But i have to admit.....i have no single Clue what a Dns Server is ...and what it is good.... or bad for.
Best Wishes!
Re: Changing DNS 'resolvers'.....what needs editing/changing? How do we do this?
Posted: Wed Feb 10, 2021 4:03 pm
by Dingo
@backi are you using sns wizard? I, using network wizard, see that resolv.conf content is still unchanged
Re: Changing DNS 'resolvers'.....what needs editing/changing? How do we do this?
Posted: Wed Feb 10, 2021 4:11 pm
by backi
Hi Dingo !
@backi are you using sns wizard? I, using network wizard, see that resolv.conf content is still unchanged
No i don`t.
Just made that script above put it in / (root) make it executable.... click it......when checking /etc/resolv.conf ....it shows:
nameserver 1.1.1.1
nameserver 1.0.0.1
But i am not really sure if it is connected to Cloudflare Server.
https://1.1.1.1/help.....for checking it........but i can not interpret it.
Re: Changing DNS 'resolvers'.....what needs editing/changing? How do we do this?
Posted: Wed Feb 10, 2021 5:41 pm
by tosim
Here you are:
Setting up 1.1.1.1 takes two minutes and requires no technical skill or special software. Even if you’re a computer novice, pick your device below for an easy-to-follow setup guide.
While these steps are for Ubuntu, most Linux distributions configure DNS settings through the Network Manager. Alternatively, your DNS settings can be specified in /etc/resolv.conf
Click the Applications icon on the left menu bar.
Click Settings, then Network.
Find your internet connection on the right pane, then click the gear icon.
Click the IPv4 or IPv6 tab to view your DNS settings.
Set the “Automatic” toggle on the DNS entry to Off.
Provide the 1.1.1.1 DNS addresses in the DNS entries field:
For IPv4: 1.1.1.1 and 1.0.0.1
For IPv6: 2606:4700:4700::1111,2606:4700:4700::1001
Click Apply, then restart your browser.
You’re all set! Your device now has faster, more private DNS servers
Re: Changing DNS 'resolvers'.....what needs editing/changing? How do we do this?
Posted: Wed Feb 10, 2021 6:27 pm
by Trapster
To answer your first question, try:
Code: Select all
# nslookup google.com
Server: 8.26.56.26
Address: 8.26.56.26:53
Non-authoritative answer:
Name: google.com
Address: 172.217.12.78
Non-authoritative answer:
Name: google.com
Address: 2607:f8b0:4000:815::200e
I use comodo's servers @
8.26.56.26
8.20.247.20
Re: Changing DNS 'resolvers'.....what needs editing/changing? How do we do this?
Posted: Wed Feb 10, 2021 6:32 pm
by bigpup
I do not understand how anyone that has worked with Puppy Linux does not understand a few facts:
All Puppy versions are slightly different.
The programs in each Puppy version may or may not be different, but a lot of them will be different versions.
The specific version of the program has a big affect on how it works and how to use it.
If you are going to talk in general terms about doing something.
You are going to get general it did not work answers.
Need to talk about a specific Puppy version.
Specific programs that are in that Puppy version.
Specific programs you may need to install and use.
Re: Changing DNS 'resolvers'.....what needs editing/changing? How do we do this?
Posted: Wed Feb 10, 2021 7:29 pm
by OscarTalks
If you go to https://dnsleaktest.com/ and use the Standard Test button it will tell you where your DNS look-ups are being sent to.
It should be whatever is defined in /etc/resolv.conf
Your network manager controls this. If you are using the default SNS, this was designed to be simple and so lacks the facility to input your own choice of DNS. This can then cause the overwrites, where it reverts back to the DNS of your ISP.
Using the Dougal Network Wizard and setting your chosen DNS should work fine. I believe you can do the same with Frisbee.
I have been using CloudFlare 1.1.1.1 for some time now and have found it to be most satisfactory.
Re: Changing DNS 'resolvers'.....what needs editing/changing? How do we do this?
Posted: Thu Feb 11, 2021 4:11 pm
by mikewalsh
Now then:-
@Dingo , @backi :-
I found that as soon as I'd set up the primary & secondary CloudFlare DNS addresses through the Network Wizard's 'Static' utility, and 'OK'ed' everything, and told Pup to save it for the next session, that was it; /etc/resolv.conf showed
Code: Select all
nameserver 1.1.1.1
nameserver 1.0.0.1
....straightaway. And it's remained that way; the whole kennels has had the same treatment now, and in every case the 'old' /etc/resolv.conf has been backed-up (renamed as a .bak file).
-------------------------------------------------
@OscarTalks :-
OscarTalks wrote: ↑Wed Feb 10, 2021 7:29 pm
If you go to https://dnsleaktest.com/ and use the Standard Test button it will tell you where your DNS look-ups are being sent to.
It should be whatever is defined in /etc/resolv.conf
Your network manager controls this. If you are using the default SNS, this was designed to be simple and so lacks the facility to input your own choice of DNS. This can then cause the overwrites, where it reverts back to the DNS of your ISP.
Using the Dougal Network Wizard and setting your chosen DNS should work fine. I believe you can do the same with Frisbee.
I have been using CloudFlare 1.1.1.1 for some time now and have found it to be most satisfactory.
Works for me. This was the result; exactly as expected....
I think I'm "sorted". Cheers, guys!
Mike.
Re: Changing DNS 'resolvers'.....what needs editing/changing? How do we do this? [SOLVED]
Posted: Thu Feb 11, 2021 7:03 pm
by Jafadmin
Why do we keep overcomplicating answers? Since the earth cooled and Unix was invented, "/etc/resolv.conf" has been the default DNS resolver definition file.
I have never seen a version of Puppy Linux that doesn't use this standard. This is the resolver that DHCP populates when you connect to a network via DHCP.
Edit the file as you deem fit. Just remember every other network tool will do so as well. It's as handy as all get out. Here's why:
If your default DNS gets messed up you can always
Code: Select all
echo "1.1.1.1 nameserver">/etc/resolv.conf
from the command line and you are instantly resolving on the webbers again.
Re: Changing DNS 'resolvers'.....what needs editing/changing? How do we do this? [SOLVED]
Posted: Fri Feb 12, 2021 10:39 am
by mikewalsh
@Jafadmin :-
Jafa, I've got one wee query for you (if you don't mind)?
When I was reading up about this originally, one of the tutorials mentioned what you've also done, namely:-
The fact that this file is readily modifiable by every network tool.
They then went on to say that that there's a way you can make this file "immutable", or unmodifiable.....by using something called chattr..? 'Change attributes' (for a guess)? I see Puppy's condensed version of bash includes it, but.....there's no usage or help instructions. What does it actually do?
All the man pages I could find online are simply echoing, or parrotting the original description on the GNU/Linux man-page; they're all on about 'file attributes', and 'metadata'. Is that the same as the 'read, write, execute' & 'ownership' stuff?
Mike.
Re: Changing DNS 'resolvers'.....what needs editing/changing? How do we do this? [SOLVED]
Posted: Fri Feb 12, 2021 12:14 pm
by Trapster
I use
#chattr -R +i /usr/local/bin
as well as chattr on other directories on my multimedia puppy server to lock them down.
#chatter -R -i /usr/local/bin will unlock them
See here for more info.
Re: Changing DNS 'resolvers'.....what needs editing/changing? How do we do this? [SOLVED]
Posted: Fri Feb 12, 2021 1:00 pm
by mikewalsh
Trapster wrote: ↑Fri Feb 12, 2021 12:14 pm
I use
#chattr -R +i /usr/local/bin
as well as chattr on other directories on my multimedia puppy server to lock them down.
#chatter -R -i /usr/local/bin will unlock them
See here for more info.
Hello, Trapster.
Ah. Now, that particular link actually clarifies things a bit. No doubt there's tons of these 'man' pages out there, but I think many blog sites simply reproduce the original, "official" documentation.....and nobody seems to want to give a synopsis in plain, clear English.
Which would help a lot of folks!
My viewpoint is this; to me, one of the biggest obstacles to more wide-spread adoption of Linux in general is NOT the OS itself - most who come across to this side of "the fence" are not stupid, and are quite prepared to research things - it's the documentation. Not the 'lack' of it (you could never accuse the community of that), but rather the way in which it's written. Very much from a 'geek' standpoint, and assuming that anyone who looks at it is already a bona-fide, fully paid-up member of the geek community.
Cheers, anyway.
Mike.
Re: Changing DNS 'resolvers'.....what needs editing/changing? How do we do this? [SOLVED]
Posted: Fri Feb 12, 2021 6:31 pm
by Jafadmin
All utilities in linux have an associated "man" page. So if you go to duckduckgo and search for "man chattr" you should get several different online "man page" resources. https://duckduckgo.com/?t=lm&q=man+chattr
Re: Changing DNS 'resolvers'.....what needs editing/changing? How do we do this? [SOLVED]
Posted: Mon Feb 15, 2021 1:17 am
by greengeek
Based on what has been suggested here i have written a little script to set Cloudflare as the dns server and check that the change has taken.
Displays an ugly but useful gxmessage to confirm that the change has "taken".
Code: Select all
#!/bin/sh
echo "nameserver 1.1.1.1" > /etc/resolv.conf
echo "nameserver 1.0.0.1" >> /etc/resolv.conf
nslookup google.com > /tmp/dnssetandcheck
DNSNEW=$(cat /tmp/dnssetandcheck)
gxmessage "$DNSNEW"
Re: Changing DNS 'resolvers'.....what needs editing/changing? How do we do this? [SOLVED]
Posted: Mon Feb 15, 2021 7:15 pm
by williams2
to repeat what has been already said:
/etc/resolv.conf is overwritten every time the network connects or reconnects.
For example, running a microwave oven might cause the wifi network to reconnect.
Whatever is in /etc/resolv.conf.head is copied to the top of /etc/resolv.conf everytime the network connects or reconnects.
So whatever nameservers are at the top of /etc/resolv.conf will become the default dns nameservers.
So this might be better in that script:
Code: Select all
echo "nameserver 1.1.1.1" > /etc/resolv.conf
echo "nameserver 1.0.0.1" >> /etc/resolv.conf
echo "nameserver 1.1.1.1
nameserver 1.0.0.1" > /etc/resolv.conf.head
Re: Changing DNS 'resolvers'.....what needs editing/changing? How do we do this? [SOLVED]
Posted: Tue Feb 16, 2021 8:18 pm
by greengeek
williams2 wrote: ↑Mon Feb 15, 2021 7:15 pm whatever nameservers are at the top of /etc/resolv.conf will become the default dns nameservers.
So this might be better in that script:
Code: Select all
echo "nameserver 1.1.1.1" > /etc/resolv.conf
echo "nameserver 1.0.0.1" >> /etc/resolv.conf
echo "nameserver 1.1.1.1
nameserver 1.0.0.1" > /etc/resolv.conf.head
Good idea, thanks
I am calling this script setdns_cloudflare_always and the previous one setdns_cloudflare_temp. They will be handy when my router does some of the funny things it occasionally does.
Code: Select all
#!/bin/sh
echo "nameserver 1.1.1.1" > /etc/resolv.conf
echo "nameserver 1.0.0.1" >> /etc/resolv.conf
echo "nameserver 1.1.1.1
nameserver 1.0.0.1" > /etc/resolv.conf.head
nslookup google.com > /tmp/dnssetandcheck
DNSNEW=$(cat /tmp/dnssetandcheck)
gxmessage "$DNSNEW"
Re: Changing DNS 'resolvers'.....what needs editing/changing? How do we do this?
Posted: Mon Aug 02, 2021 3:50 pm
by Feek
OscarTalks wrote: ↑Wed Feb 10, 2021 7:29 pm
If you go to https://dnsleaktest.com/ and use the Standard Test button it will tell you where your DNS look-ups are being sent to.
It should be whatever is defined in /etc/resolv.conf
Your network manager controls this. If you are using the default SNS, this was designed to be simple and so lacks the facility to input your own choice of DNS. This can then cause the overwrites, where it reverts back to the DNS of your ISP.
Using the Dougal Network Wizard and setting your chosen DNS should work fine. I believe you can do the same with Frisbee.
I have been using CloudFlare 1.1.1.1 for some time now and have found it to be most satisfactory.
Hello,
I did some experiments. In Firefox it's possible to set "DNS over HTTPS" and the default dns server is Cloudflare.
With ticked "DNS over HTTPS" the standard test shows the Cloudflare's servers,
with unticked "DNS over HTTPS" the standard test shows a server of my ISP.
According to the dnsleaktest this feature of Firefox gives the same result as the editing of the /etc/resolv.conf file (this provided that i want cloudflare).
Is it really so or is there any fundamental difference that I am not aware of?
Re: Changing DNS 'resolvers'.....what needs editing/changing? How do we do this?
Posted: Thu Aug 05, 2021 9:13 am
by Feek
Feek wrote: ↑Mon Aug 02, 2021 3:50 pm
OscarTalks wrote: ↑Wed Feb 10, 2021 7:29 pm
If you go to https://dnsleaktest.com/ and use the Standard Test button it will tell you where your DNS look-ups are being sent to.
It should be whatever is defined in /etc/resolv.conf
Your network manager controls this. If you are using the default SNS, this was designed to be simple and so lacks the facility to input your own choice of DNS. This can then cause the overwrites, where it reverts back to the DNS of your ISP.
Using the Dougal Network Wizard and setting your chosen DNS should work fine. I believe you can do the same with Frisbee.
I have been using CloudFlare 1.1.1.1 for some time now and have found it to be most satisfactory.
Hello,
I did some experiments. In Firefox it's possible to set "DNS over HTTPS" and the default dns server is Cloudflare.
With ticked "DNS over HTTPS" the standard test shows the Cloudflare's servers,
with unticked "DNS over HTTPS" the standard test shows a server of my ISP.
According to the dnsleaktest this feature of Firefox gives the same result as the editing of the /etc/resolv.conf file (this provided that i want cloudflare).
Is it really so or is there any fundamental difference that I am not aware of?
I apologize for my previous post, my question was slightly different from this topic .
It was a lack of knowledge, searching for information helped.
I´ve found that the alternative dns on the level of the browser is possible too with the feature DNS over HTTPS (this is done through port TCP/443 and should be encrypted). This has an effect only on the browser, not on other applications.