Thursday, April 25, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 1218  / 3 Years ago, mon, october 11, 2021, 12:20:50

I am using Ubuntu 12.04. I am doing Internet with a USB Modem of 236kbps. My issue is that if I am accessing a web page through a browser it works, but if I am doing sudo apt-get update in a terminal, there is no response. Please help me to solve this.



One more thing; I am unable to change my DNS settings.



raja@badfox:~$ cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 220.226.100.40
nameserver 220.226.6.104
nameserver 127.0.0.1


I want to replace these addresses with ones linked here http://www.cyberciti.biz/faq/free-dns-server/.



See the picture to have some idea about my issue .enter image description here


More From » 12.04

 Answers
6

In Ubuntu 12.04 changes were made to DNS resolving, announced here; also see the resolvconf man page.



Changes state that




resolvconf is a set of script and hooks managing DNS resolution. The
most notable difference for the user is that any change manually done
to /etc/resolv.conf will be lost as it gets overwritten next time
something triggers resolvconf. Instead, resolvconf uses DHCP client
hooks, a Network Manager plugin and /etc/network/interfaces to
generate a list of nameservers and domain to put in /etc/resolv.conf.




"I use static IP configuration, where should I put my DNS configuration?"




The DNS configuration for a static interface should go as
“dns-nameservers”, “dns-search” and “dns-domain” entries added to the
interface in /etc/network/interfaces







To try from Older method i.e. prior to Ubuntu 12.04 edition




NOTE: Before you change your DNS settings to use Google Public DNS or
OpenDNS, be sure to backup the current server addresses or settings
somewhere. It is very important that you keep these numbers for backup
purposes, in case you need to revert to them at any time.




Option A: Changing DNS server settings on Ubuntu can be configured through Network Manager.



In the System Settings..., go to Network, then Select the connection for which you want to configure Google Public DNS.




  • To change the settings for an Ethernet connection, select the Wired tab, then select your network interface in the list. It is usually called eth0.


  • To change the settings for a Wireless connection, select the Wireless tab, then select the appropriate wireless network.


  • Click Edit, and in the window that appears, select the IPv4 Settings or IPv6 Settings tab according to your needs.


  • If the selected method is Automatic (DHCP), open the dropdown and select Automatic (DHCP) addresses only instead. If the method is set to something else, do not change it.


  • In the DNS servers field, enter the Google Public DNS IP addresses, separated by a space:



    For IPv4:



    8.8.8.8 and/or 8.8.4.4


    For IPv6:



    2001:4860:4860::8888 and/or 2001:4860:4860::8844

  • Click Apply to save the change. If you are prompted for a password or confirmation, type the password or provide confirmation. Test your settings here.




Option B: Alternately through CLI




  • Edit /etc/resolv.conf:



    sudo gedit /etc/resolv.conf

  • If any nameserver lines appear, backup the IP addresses for future reference.


  • Replace the nameserver lines with, or ADD the following lines:



    For IPv4:



    nameserver 8.8.8.8
    nameserver 8.8.4.4


    You can select your Linked addresses here.



    For IPv6:



    nameserver 2001:4860:4860::8888
    nameserver 2001:4860:4860::8844

  • Save and exit. And again test it from above link.




Source.


[#37214] Wednesday, October 13, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ainbby

Total Points: 184
Total Questions: 115
Total Answers: 112

Location: Colombia
Member since Thu, Sep 29, 2022
2 Years ago
ainbby questions
Thu, Mar 23, 23, 10:26, 1 Year ago
Wed, May 10, 23, 00:10, 1 Year ago
Fri, Apr 15, 22, 10:11, 2 Years ago
;