LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   DNS problem (https://www.linuxquestions.org/questions/linux-networking-3/dns-problem-272273/)

gwh23960 12-31-2004 07:20 AM

DNS problem
 
Sorry if this is a dumb question. I am new to linux.

I have a dual boot system with windows xp and Mandrake Linux 10.1. I have a DSL connection to the internet. When I boot into linux the DNS addresses are not correct and I therefore cannot surf the web without manually changing them. I change them using the mandrake linux control center and everything works just fine. But when I reboot or relog in everything reverts back to the incorrect addresses. I am not sure how the system is determining what the DNS addresses should be. Everything works fine in XP.

Where do I look to figure out what is going wrong?

--Thanks in advance for any help

qazzaq 12-31-2004 07:25 AM

check your /etc/resolv.conf

gwh23960 12-31-2004 07:30 AM

/etc/resolv.conf has the correct addresses right now. But when I reboot, those entries are replaced with the incorrect ones.

qazzaq 12-31-2004 07:43 AM

how about /etc/sysconfig/networking/profiles/default/resolv.conf

gwh23960 12-31-2004 07:56 AM

There are no files in the /etc/sysconfig/networking/profiles/default folder

qazzaq 12-31-2004 08:02 AM

Do you have any other profiles configured?

gwh23960 12-31-2004 08:06 AM

I don't think so. The /etc/sysconfig/networking/profiles folder only has the default folder in it, which is empty.

cowanrl 12-31-2004 09:24 AM

This works on RH machines and I'm pretty sure it will work on Mandrake also. Add this line to /etc/sysconfig/network-scripts/ifcfg-eth0:

PEER DNS = NO

That stops the values in resolv.conf from being overwritten by any other source.

gwh23960 01-01-2005 01:39 AM

Even when I set PEERDNS to no, some other script keeps changing it. Maybe there is a way to disable that as well?

What I really would like to know is how to get dhclient to dynamically obtain the correct DNS information. Right now it is getting 192.168.0.1 as DNS#1 and 205.171.3.65 as DNS#2. What it should be getting is 205.171.3.65 as DNS#1 and 205.171.2.65 as DNS#2. When I do not manually set it myself everytime I boot into linux, web pages timeout before the IP address can be resolved.

Any help is greatly appreciated.

louis_m_c 01-01-2005 07:39 AM

I have a similar problem with Mandrake. the Resolv.conf kept changing to its original config every time I reboot. What I found (without searching further) is that I resolved the problem using the GUI config panel (drakconf) to set my internet connection right (again). then the new settings where kept. But Mandrake team should see further onto that anoying thing.

Since I have now a forwarding DNS server, I need special things in my resolv.conf so what I do is that I copy a backed up copy of my good resolv.conf witch I copy over the one that mandrake place at every restart. I just put the following line in my /etc/rc.d/rc.local


cp /etc/resolv.conf.backup /etc/resolv.conf -f

just be sure it is changed before network is started, i'm not sure if the rc.local is a good place for you. make a trace echoing things into various rc files to the /var/log/messages (echo "blabla" >> /var/log/messages), then check the log.


geden 03-03-2008 06:22 PM

make a file in /etc/rcS.d called S99dns

#nano /etc/rcS.d/S99dns

put this in it

#!/bin/bash

echo nameserver(your proper dns address i.e. 192.168.1.1 or whatever) > /etc/resolv.conf

example: echo nameserver 192.168.1.1 > /etc/resolv.conf

do

chmod 700 /etc/rcS.d/S99dns

now when it reboots it should rewrite /etc/resolv.conf with your proper dns address

worth a try!

louis_m_c 03-03-2008 06:45 PM

3 years later... lol


All times are GMT -5. The time now is 08:44 PM.