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@damtek.com> 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
Reply to: