LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 12-31-2004, 08:20 AM   #1
gwh23960
LQ Newbie
 
Registered: Dec 2004
Posts: 5

Rep: Reputation: 0
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
 
Old 12-31-2004, 08:25 AM   #2
qazzaq
LQ Newbie
 
Registered: Dec 2004
Distribution: fedora core 2
Posts: 19

Rep: Reputation: 0
check your /etc/resolv.conf
 
Old 12-31-2004, 08:30 AM   #3
gwh23960
LQ Newbie
 
Registered: Dec 2004
Posts: 5

Original Poster
Rep: Reputation: 0
/etc/resolv.conf has the correct addresses right now. But when I reboot, those entries are replaced with the incorrect ones.
 
Old 12-31-2004, 08:43 AM   #4
qazzaq
LQ Newbie
 
Registered: Dec 2004
Distribution: fedora core 2
Posts: 19

Rep: Reputation: 0
how about /etc/sysconfig/networking/profiles/default/resolv.conf
 
Old 12-31-2004, 08:56 AM   #5
gwh23960
LQ Newbie
 
Registered: Dec 2004
Posts: 5

Original Poster
Rep: Reputation: 0
There are no files in the /etc/sysconfig/networking/profiles/default folder

Last edited by gwh23960; 12-31-2004 at 08:57 AM.
 
Old 12-31-2004, 09:02 AM   #6
qazzaq
LQ Newbie
 
Registered: Dec 2004
Distribution: fedora core 2
Posts: 19

Rep: Reputation: 0
Do you have any other profiles configured?
 
Old 12-31-2004, 09:06 AM   #7
gwh23960
LQ Newbie
 
Registered: Dec 2004
Posts: 5

Original Poster
Rep: Reputation: 0
I don't think so. The /etc/sysconfig/networking/profiles folder only has the default folder in it, which is empty.
 
Old 12-31-2004, 10:24 AM   #8
cowanrl
Member
 
Registered: Dec 2004
Location: Western Pennsylvania, USA
Distribution: Red Hat
Posts: 150

Rep: Reputation: 15
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.
 
Old 01-01-2005, 02:39 AM   #9
gwh23960
LQ Newbie
 
Registered: Dec 2004
Posts: 5

Original Poster
Rep: Reputation: 0
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.
 
Old 01-01-2005, 08:39 AM   #10
louis_m_c
LQ Newbie
 
Registered: Dec 2004
Location: Saint-Hubert, Canada
Posts: 26

Rep: Reputation: 15
Lightbulb

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.


Last edited by louis_m_c; 01-01-2005 at 08:44 AM.
 
Old 03-03-2008, 07:22 PM   #11
geden
Member
 
Registered: Nov 2004
Distribution: Mandriva ONE/ Kubuntu 8.04
Posts: 61

Rep: Reputation: 15
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!
 
Old 03-03-2008, 07:45 PM   #12
louis_m_c
LQ Newbie
 
Registered: Dec 2004
Location: Saint-Hubert, Canada
Posts: 26

Rep: Reputation: 15
3 years later... lol
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DNS problem. Please help! auroratrading Linux - Networking 1 04-05-2005 03:14 AM
problem with DNS bglad Linux - Networking 9 10-20-2003 06:39 AM
Possible DNS problem? JimBass Linux - Newbie 8 10-03-2003 11:23 PM
DNS problem with RH 8.0 datamisc Linux - Newbie 2 12-20-2002 01:37 PM
DNS problem Cubiq Linux - Networking 12 09-06-2002 04:42 AM


All times are GMT -5. The time now is 04:00 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration