Re: How to fix resolv.conf?



On Thu, Jul 24, 2008 at 04:35:59PM +0100, Rodolfo Medina wrote:

When connecting to internet with a certain provider, I have problems with
browsing. Then I want to fill the file /etc/resolv.conf with the proper dns
servers but the file changes automatically during the connection being filled
with values different from the ones I want.

Googling around I experimented many possible solutions but none worked
(e.g. edit the file /etc/network/interfaces or /etc/dhcp3/dhclient.conf).
Even putting off the write permissions over resolv.conf did not work: it must
be created every time.

Does anyone have any experience about a real solution?


"Damon L. Chesser" <damon@xxxxxxxxxx> writes:

Rodolfo,

I don't understand your issue. Are you using dhcp, you must be, and as
a result, your resolve.conf changes with input from the dhcp server.
Use static IP in /etc/network/interfaces, edit resolv.conf, you are
done.

Here is a copy of my files:

cat /etc/resolv.conf
domain damtek.org
search damtek.org
nameserver 68.87.68.162
nameserver 68.87.74.162
nameserver 192.168.200.1

cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
# address 192.168.200.15
# netmask 255.255.255.0
# network 192.168.200.0
# broadcast 192.168.200.255
# gateway 192.168.200.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 192.168.200.1
dns-search damtek.org
address 192.168.200.15
netmask 255.255.255.0
gateway 192.168.200.1


iface eth1 inet static
address 192.168.200.16
netmask 255.255.255.0
gateway 192.168.200.1


My dns servers do not now change as a result. If you use dhcp (and have
to use it) then in my case the name servers are given to me by my
router/dns server which gets it from the ISP. I do not have resolveconf
package installed. Does this help?



Thanks. My `/etc/network/interface' is very poor:


# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback


. Now, suppose I want the following ppp connection log output:

local IP address 151.82.24.152
remote IP address 10.6.6.6
primary DNS address 193.70.152.25
secondary DNS address 193.70.192.25

. In /etc/resolv.conf I suppose I have to put the lines:

nameserver 193.70.152.25
nameserver 193.70.192.25

. How do you suggest I should edit /etc/network/interface?

Thanks
Rodolfo


--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx



Relevant Pages

  • Re: Domain Name Problems
    ... >> I'm having a problem redirecting a domain name's DNS service registered ... I a little note in Network Solutions' help pages. ... > domain name servers from the service provider that will be hosting ... > (which would not work unless someone else resolved the nameserver names). ...
    (comp.os.linux.networking)
  • Re: routing table problem after power failure (sarge)
    ... > - After playing around with Postfix' configuration, ... back one or more nameserver entries doesn't get DNS going? ... check if one of the TLD servers is responding to you - for example B.NIC.FR ...
    (Debian-User)
  • Re: Internet Time Out
    ... the Names Servers for star-kcorp.com are found as below. ... star-kcorp.com nameserver = dns3.name-services.com ... Are all these your DNS servers?? ... Further are you using a third party firewall? ...
    (microsoft.public.windows.server.dns)
  • RE: [SLE] Still no Internet....
    ... nameserver x.x.x.x ... If your router doesn't do DNS resolving, get your DNS servers from your ISP. ...
    (SuSE)
  • Re: How did the /etc/resolv.conf appear?
    ... nameserver 82.207.67.2 ... Today I discovered that this servers is not servers of FreeBSD.org ... or InterNIC, but of my ISP. ... You must be using DHCP to obtain an address for your network interface... ...
    (freebsd-questions)