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 |
check your /etc/resolv.conf
|
/etc/resolv.conf has the correct addresses right now. But when I reboot, those entries are replaced with the incorrect ones.
|
how about /etc/sysconfig/networking/profiles/default/resolv.conf
|
There are no files in the /etc/sysconfig/networking/profiles/default folder
|
Do you have any other profiles configured?
|
I don't think so. The /etc/sysconfig/networking/profiles folder only has the default folder in it, which is empty.
|
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. |
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. |
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. |
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! |
3 years later... lol
|
All times are GMT -5. The time now is 08:44 PM. |