Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sun 15 Sep 2019, 02:03
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
resolv.conf gets reset (Solved)
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [6 Posts]  
Author Message
twigboy

Joined: 20 Apr 2016
Posts: 8

PostPosted: Wed 31 Jul 2019, 21:03    Post subject:  resolv.conf gets reset (Solved)  

I have found that despite getting a wifi connection, internet (meaning dns) is not accessible because resolv.conf is periodically resetting to an empty default. Meaning, it's empty except the default comments about resolv.conf.head and .tail. Sometimes it is on startup.
Quote:
# Generated by dhcpcd
# /etc/resolv.conf.head can replace this line
# /etc/resolv.conf.tail can replace this line


Where do I go to get this fixed? Xenialpup. Using it for a well over a year but this started the other day. Tried the various network programs to set wifi -- same results. I've reset the router also. So what triggered this problem?

Thanks.
David.
Back to top
View user's profile Send private message 
s243a

Joined: 02 Sep 2014
Posts: 2072

PostPosted: Wed 31 Jul 2019, 22:42    Post subject: Re: resolv.conf gets reset
Subject description: resolv.conf resetting
 

twigboy wrote:
I have found that despite getting a wifi connection, internet (meaning dns) is not accessible because resolv.conf is periodically resetting to an empty default. Meaning, it's empty except the default comments about resolv.conf.head and .tail. Sometimes it is on startup.
Quote:
# Generated by dhcpcd
# /etc/resolv.conf.head can replace this line
# /etc/resolv.conf.tail can replace this line


Where do I go to get this fixed? Xenialpup. Using it for a well over a year but this started the other day. Tried the various network programs to set wifi -- same results. I've reset the router also. So what triggered this problem?

Thanks.
David.


Create a file called "/etc/resolv.conf.head" and put your preferred DNS servers there.

_________________
Find me on minds and on pearltrees.
Back to top
View user's profile Send private message Visit poster's website 
twigboy

Joined: 20 Apr 2016
Posts: 8

PostPosted: Thu 01 Aug 2019, 00:07    Post subject: Re: resolv.conf gets reset
Subject description: resolv.conf resetting
 

s243a wrote:

Create a file called "/etc/resolv.conf.head" and put your preferred DNS servers there.


Thanks. That works. I was able to get the dns server info from another notebook, but how would I know what to put in there from another wifi, such as at a hotel?
Back to top
View user's profile Send private message 
s243a

Joined: 02 Sep 2014
Posts: 2072

PostPosted: Thu 01 Aug 2019, 00:52    Post subject: Re: resolv.conf gets reset
Subject description: resolv.conf resetting
 

twigboy wrote:
s243a wrote:

Create a file called "/etc/resolv.conf.head" and put your preferred DNS servers there.


Thanks. That works. I was able to get the dns server info from another notebook, but how would I know what to put in there from another wifi, such as at a hotel?


The dhcpd daemon usually does this automatically for you based on info from your router/gateway and the isp that it is connected to. Typically one only specifies an alternate when they want to use an alternative dns server for:
1. better privacy,
2. censorship circumventation
3. better dns lookup speeds.

For instance, one might accomplish:
#3 by using a dns caching server on their local network.
#1 by using vpn, dnscrypt (or possibly tor but tor might not be as reliable as the other two options).
#2 might be accomplished by using a dns server located in the country of the site that you want to visit.

If dhcpd is not doing this automatically for you then it may be the case that your router is incorrectly configured or less likely that your dhcpd daemon is not running or doesn't have write permission to this file.

As a final note, if you know the ip addresses of the sites you want to visit then you could use a "host file", which will allow you to access the sites if for some reason your dns servers aren't working. However, a host file won't automatically update if the ip address of the site changes (which might have security implications) and it won't get the speed benefits of geographic load balancing, which might be used in a CDN (content distribution network) such as cloudflare.

_________________
Find me on minds and on pearltrees.
Back to top
View user's profile Send private message Visit poster's website 
twigboy

Joined: 20 Apr 2016
Posts: 8

PostPosted: Thu 01 Aug 2019, 19:17    Post subject: Re: resolv.conf gets reset
Subject description: resolv.conf resetting
 

s243a wrote:

If dhcpd is not doing this automatically for you then it may be the case that your router is incorrectly configured or less likely that your dhcpd daemon is not running or doesn't have write permission to this file.


That another puppylinux works fine on this router, as does a number of Windows and a Mac ibook , I think the router is fine. So I'll have to look into the dhcpd situation. Thanks for that tidbit.
Back to top
View user's profile Send private message 
twigboy

Joined: 20 Apr 2016
Posts: 8

PostPosted: Thu 01 Aug 2019, 20:11    Post subject:  

It occurred to me to put the lines in /etc/resolv.conf.tail instead of .head so that when connecting to a new router it should (hopefully) pickup the dns correctly, but if not it will default to:

Quote:

nameserver 10.0.0.1
nameserver 8.8.8.8


I tested this, and used nslookup to see that the first nameserver is used succesfully (I switched them to see the results change). Here it used the Comcast 10.0.0.1
Quote:

root# nslookup 8.8.8.8
Server: 10.0.0.1
Address 1: 10.0.0.1 Docsis-Gateway.hsd1.va.comcast.net

Name: 8.8.8.8
Address 1: 8.8.8.8 dns.google


Switching the order to Google's first
Quote:

root# nslookup 8.8.8.8
Server: 8.8.8.8
Address 1: 8.8.8.8 dns.google

Name: 8.8.8.8
Address 1: 8.8.8.8 dns.google


Does this sound right?
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [6 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0456s ][ Queries: 11 (0.0110s) ][ GZIP on ]