Jump to content

Photo

Using DNS from other websites


Best Answer Charles@Bodhi, 02 August 2017 - 07:27 PM

Back on my own computer now.

You can make changes without doing edits in resolvconf. I give you some code that achieves what you want, explanation further down.

cat /etc/resolv.conf # will show the current content including one dns x.x.x.x
sudo su
cp /etc/network/interfaces /etc/network/interfaces-orig
echo 'dns-nameservers 8.8.8.8 8.8.4.4' >> /etc/network/interfaces
ifdown -a
ifup -a
exit
cat /etc/resolv.conf # will show the new content including the new nameservers

cat prints the file content to the screen

make yourself temporarily root

save a copy of the interface file

write the dns-nameserver ip addresses to the interface file

bring networkservice down

activate networkservice again

leave the root session

compare the two resolv.conf files

 

INFO: IP 8.8.8.8 is the primary google dns-server and 8.8.4.4 an alternative. You can change those for your preferred dns IP addresses.

If you really don't want to deactivate the network you can run resolvconf -u instead of ifdown/ifup to regenerate resolv.conf. But I'm not sure this works immediately for your connections, might need a reboot.

 

Hope this works on your machine.

 

Enjoy,

Charles

Go to the full post


  • Please log in to reply
16 replies to this topic

#1 wimc

wimc

    Member

  • Members
  • 56 posts
  • LocationWashougal, WA

Posted 31 July 2017 - 06:10 PM

Using DNS from other websites such as google, opendns. How do you add these?

 

Really getting tired of my ISP (frontier) hijacking urls to their search crap, when I want to see the "server not found" message.

 

Can not find anything through search, everything that comes up has nothing to with DNS.

 

Please help me.


www.fnctn.net - My computer - Dell XPS 8910 (tower), Bodhi Linux 4.2.0-64 (no other OS), Intel Core I7-6700 CPU @ 3.4 GHz, 16 GB ram, 1 TB HDD, Nvidia Gefore GTX 750 Ti with 2 GB, 27" display at 1920x1080 res.

Parents computer - Dell XPS 8700 (tower), Bodhi Linux 4.2.0-64 (no other OS), Intel Core I7-4790 CPU @ 3.6 GHz, 8 GB ram, 1 TB HDD, Nvidia Gefore GT 720 with 4 GB (1GB standard, 3 GB shared), 27" display at 1920x1080 res.




A big thank you to everyone who contributes to Bodhi Linux


#2 Charles@Bodhi

Charles@Bodhi

    Old Faithful

  • Moderators
  • 4515 posts
  • LocationZeist, The Netherlands

Posted 31 July 2017 - 09:47 PM

Hmm, the nameserver your machine uses is stored in a file called /etc/resolv.conf. But that is not the place where you can permanently change it.

 

I'm sure you will find something with a search for "ubuntu resolvconf nameserver change", maybe on their forums or ask-ubuntu.

 

Remember Bodhi 4.0 is based on ubuntu 16.04 and uses its network approach methods. Bodhi 3.x was ubuntu 14.04.

 

Enjoy,

Charles



#3 DOOMguy

DOOMguy

    Member

  • Members
  • 166 posts

Posted 31 July 2017 - 10:19 PM

I would review my browser preferences; there is a checkbox --and it may be checked by default OOTB (which annoys me no end). This one can be found in Advanced settings > Privacy in Chrome: "Use a web service when an address cannot be found" I always turn that off. Like you, I prefer to see a 404-page not found. The good ones even show the classic Homer Simpson facepalm D'oh!  :D That much I can tolerate.

 

Try that out before you go and modify resolv.conf and friends.


Unsolicited advice for learning linux, that won't cost you anything


#4 birdmun

birdmun

    Member

  • Members
  • 350 posts
  • LocationWabash, IN

Posted 02 August 2017 - 12:33 AM

To change the DNS servers via GUI, right click on network manager applet and left click edit connection. Select your wired/wireless connection and click edit. In the new window you will see tabs across the top two are labeled ipv4 settings and ipv6 settings. If you are using ipv4 select it and then in the additional dns servers add your other ip addresses. The same would go for the ipv6, if that is the address system your isp uses.

 

That should work. I jump through similar hoops when adding a vpn.



#5 wimc

wimc

    Member

  • Members
  • 56 posts
  • LocationWashougal, WA

Posted 02 August 2017 - 02:32 AM

Added like what birdnum suggested, but not working.

 

Tried 3 different DNS:

 8.8.8.8, 8.8.4.4

 208.67.222.222, 208.67.220.220

 8.8.8.8, 8.8.4.4, 208.67.222.222, 208.67.220.220

 

Am I missing something?


www.fnctn.net - My computer - Dell XPS 8910 (tower), Bodhi Linux 4.2.0-64 (no other OS), Intel Core I7-6700 CPU @ 3.4 GHz, 16 GB ram, 1 TB HDD, Nvidia Gefore GTX 750 Ti with 2 GB, 27" display at 1920x1080 res.

Parents computer - Dell XPS 8700 (tower), Bodhi Linux 4.2.0-64 (no other OS), Intel Core I7-4790 CPU @ 3.6 GHz, 8 GB ram, 1 TB HDD, Nvidia Gefore GT 720 with 4 GB (1GB standard, 3 GB shared), 27" display at 1920x1080 res.


#6 birdmun

birdmun

    Member

  • Members
  • 350 posts
  • LocationWabash, IN

Posted 02 August 2017 - 07:03 AM

Try the following https://support.rack...tings-on-linux/



#7 Randy

Randy

    Bodhi-Care

  • Members
  • 637 posts
  • LocationFort Wayne, IN USA

Posted 02 August 2017 - 09:17 AM

Make sure to disconnect and reconnect.   Also on ipv4 settings tab make sure to select "automatic (DHCP) address only"


Randy Fry



Linux Addict!

#8 wimc

wimc

    Member

  • Members
  • 56 posts
  • LocationWashougal, WA

Posted 02 August 2017 - 12:41 PM

Firstly, thanks everyone.

 

Computers are working flawlessly, kinda leary about editing the /etc/resolv.conf file.

 

Randy, done and that was default. Still get redirected to ISP search page.


www.fnctn.net - My computer - Dell XPS 8910 (tower), Bodhi Linux 4.2.0-64 (no other OS), Intel Core I7-6700 CPU @ 3.4 GHz, 16 GB ram, 1 TB HDD, Nvidia Gefore GTX 750 Ti with 2 GB, 27" display at 1920x1080 res.

Parents computer - Dell XPS 8700 (tower), Bodhi Linux 4.2.0-64 (no other OS), Intel Core I7-4790 CPU @ 3.6 GHz, 8 GB ram, 1 TB HDD, Nvidia Gefore GT 720 with 4 GB (1GB standard, 3 GB shared), 27" display at 1920x1080 res.


#9 Charles@Bodhi

Charles@Bodhi

    Old Faithful

  • Moderators
  • 4515 posts
  • LocationZeist, The Netherlands

Posted 02 August 2017 - 07:27 PM   Best Answer

Back on my own computer now.

You can make changes without doing edits in resolvconf. I give you some code that achieves what you want, explanation further down.

cat /etc/resolv.conf # will show the current content including one dns x.x.x.x
sudo su
cp /etc/network/interfaces /etc/network/interfaces-orig
echo 'dns-nameservers 8.8.8.8 8.8.4.4' >> /etc/network/interfaces
ifdown -a
ifup -a
exit
cat /etc/resolv.conf # will show the new content including the new nameservers

cat prints the file content to the screen

make yourself temporarily root

save a copy of the interface file

write the dns-nameserver ip addresses to the interface file

bring networkservice down

activate networkservice again

leave the root session

compare the two resolv.conf files

 

INFO: IP 8.8.8.8 is the primary google dns-server and 8.8.4.4 an alternative. You can change those for your preferred dns IP addresses.

If you really don't want to deactivate the network you can run resolvconf -u instead of ifdown/ifup to regenerate resolv.conf. But I'm not sure this works immediately for your connections, might need a reboot.

 

Hope this works on your machine.

 

Enjoy,

Charles



#10 wimc

wimc

    Member

  • Members
  • 56 posts
  • LocationWashougal, WA

Posted 09 August 2017 - 05:17 PM

Whats shows in cat /etc/resolv.conf

nameserver 8.8.8.8
nameserver 8.8.4.4
nameserver 127.0.1.1
search westell.com

Before the change:

nameserver 127.0.1.1
search westell.com

Thank you Charles.

 

Edit: like to thank everyone else for their posts as well.


Edited by wimc, 09 August 2017 - 05:31 PM.

www.fnctn.net - My computer - Dell XPS 8910 (tower), Bodhi Linux 4.2.0-64 (no other OS), Intel Core I7-6700 CPU @ 3.4 GHz, 16 GB ram, 1 TB HDD, Nvidia Gefore GTX 750 Ti with 2 GB, 27" display at 1920x1080 res.

Parents computer - Dell XPS 8700 (tower), Bodhi Linux 4.2.0-64 (no other OS), Intel Core I7-4790 CPU @ 3.6 GHz, 8 GB ram, 1 TB HDD, Nvidia Gefore GT 720 with 4 GB (1GB standard, 3 GB shared), 27" display at 1920x1080 res.


#11 wimc

wimc

    Member

  • Members
  • 56 posts
  • LocationWashougal, WA

Posted 09 August 2017 - 08:14 PM

After changing/adding to /etc/resolv.conf it takes roughly 20 seconds to load page. This is from closing browser and opening, does not matter if page was cached.


www.fnctn.net - My computer - Dell XPS 8910 (tower), Bodhi Linux 4.2.0-64 (no other OS), Intel Core I7-6700 CPU @ 3.4 GHz, 16 GB ram, 1 TB HDD, Nvidia Gefore GTX 750 Ti with 2 GB, 27" display at 1920x1080 res.

Parents computer - Dell XPS 8700 (tower), Bodhi Linux 4.2.0-64 (no other OS), Intel Core I7-4790 CPU @ 3.6 GHz, 8 GB ram, 1 TB HDD, Nvidia Gefore GT 720 with 4 GB (1GB standard, 3 GB shared), 27" display at 1920x1080 res.


#12 wimc

wimc

    Member

  • Members
  • 56 posts
  • LocationWashougal, WA

Posted 09 August 2017 - 09:24 PM

Leaving as solved, went from one annoyance to another, doing other steps and reversing the copy. Now there is no hang opening browser, back to original annoyance.

 

As for the DNS from opendns, it also would hang 20-25 seconds opening browser.


www.fnctn.net - My computer - Dell XPS 8910 (tower), Bodhi Linux 4.2.0-64 (no other OS), Intel Core I7-6700 CPU @ 3.4 GHz, 16 GB ram, 1 TB HDD, Nvidia Gefore GTX 750 Ti with 2 GB, 27" display at 1920x1080 res.

Parents computer - Dell XPS 8700 (tower), Bodhi Linux 4.2.0-64 (no other OS), Intel Core I7-4790 CPU @ 3.6 GHz, 8 GB ram, 1 TB HDD, Nvidia Gefore GT 720 with 4 GB (1GB standard, 3 GB shared), 27" display at 1920x1080 res.


#13 birdmun

birdmun

    Member

  • Members
  • 350 posts
  • LocationWabash, IN

Posted 09 August 2017 - 10:24 PM

Maybe something like tracepath or sudo traceroute might help. I wouldn't hold my breath though. If you have traceroute installed,

sudo traceroute 8.8.8.8

should show a list of hops. There may be other switches required to get more useful information. If you have tracepath installed,

tracepath 8.8.8.8

should show a similar list of hops. For me it failed to provide any useful info shortly after hitting the isp servers. YMMV



#14 Charles@Bodhi

Charles@Bodhi

    Old Faithful

  • Moderators
  • 4515 posts
  • LocationZeist, The Netherlands

Posted 10 August 2017 - 12:12 PM

You could follow my "guide" again and do some extra's.

 

Still having the internal dns in resolv.conf might be a factor. I've read that the following was no longer needed in 16.04, but that seems to be wrong.
 
Open /etc/NetworkManager/NetworkManager.conf and look for the line dns=XXXXXX and comment that line out by adding a # in front of it.
This will result in having no more 127.0.1.1 in resolv.conf and maybe speed things up.
 
Furthermore you could choose for not using Google but other public DNS servers, like HERE. Just replace the 8.8.8.8 and 8.8.4.4 
 
Enjoy,
Charles


#15 wimc

wimc

    Member

  • Members
  • 56 posts
  • LocationWashougal, WA

Posted 11 August 2017 - 08:20 AM

This is what /etc/NetworkManager/NetworkManager.conf has.

[main]
plugins=ifupdown,keyfile,ofono
dns=dnsmasq

[ifupdown]
managed=false

www.fnctn.net - My computer - Dell XPS 8910 (tower), Bodhi Linux 4.2.0-64 (no other OS), Intel Core I7-6700 CPU @ 3.4 GHz, 16 GB ram, 1 TB HDD, Nvidia Gefore GTX 750 Ti with 2 GB, 27" display at 1920x1080 res.

Parents computer - Dell XPS 8700 (tower), Bodhi Linux 4.2.0-64 (no other OS), Intel Core I7-4790 CPU @ 3.6 GHz, 8 GB ram, 1 TB HDD, Nvidia Gefore GT 720 with 4 GB (1GB standard, 3 GB shared), 27" display at 1920x1080 res.


#16 Charles@Bodhi

Charles@Bodhi

    Old Faithful

  • Moderators
  • 4515 posts
  • LocationZeist, The Netherlands

Posted 11 August 2017 - 10:08 AM

 

This is what /etc/NetworkManager/NetworkManager.conf has.

[main]
plugins=ifupdown,keyfile,ofono
dns=dnsmasq

[ifupdown]
managed=false

 

After adding the nameservers to the interfaces file you can edit that to look like this:

[main]
plugins=ifupdown,keyfile,ofono
# dns=dnsmasq

[ifupdown]
managed=false

Just do

sudo epad /etc/NetworkManager/NetworkManager.conf 

make the edit ( the # before dns=dnsmasq) and save the file.

 

Now continue with ifdown and the rest. /etc/resolv.conf should no longer have the forwarding ip 127.0.1.1 and thus networkmanger should no longer use it at all and that should speed up things.

 

If you are willing to test this, would be great. I'm curious myself, never needed to use it.

 

Enjoy,

Charles



#17 wimc

wimc

    Member

  • Members
  • 56 posts
  • LocationWashougal, WA

Posted 12 August 2017 - 04:11 AM

What shows in cat /etc/resolv.conf

nameserver 66.93.87.2
nameserver 216.231.41.2
nameserver 192.168.1.1
search westell.com

Still stalls on loading browser, 20-25 seconds.


www.fnctn.net - My computer - Dell XPS 8910 (tower), Bodhi Linux 4.2.0-64 (no other OS), Intel Core I7-6700 CPU @ 3.4 GHz, 16 GB ram, 1 TB HDD, Nvidia Gefore GTX 750 Ti with 2 GB, 27" display at 1920x1080 res.

Parents computer - Dell XPS 8700 (tower), Bodhi Linux 4.2.0-64 (no other OS), Intel Core I7-4790 CPU @ 3.6 GHz, 8 GB ram, 1 TB HDD, Nvidia Gefore GT 720 with 4 GB (1GB standard, 3 GB shared), 27" display at 1920x1080 res.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users