Credit Card | Hen Night | MPAA | Credit Card Consolidation | Loans
nameserver resolution problem w/mdk 10.0 [Archive] - ZGeek

PDA

View Full Version : nameserver resolution problem w/mdk 10.0


m0loch
29-12-2004, 05:27 AM
Running Mandrake 10.0, pretty much installed out-of-the-box default. I've dabbled with linux in the past but am having troubles with it now.

with shorewall running, I can't do anything intraweb-wise. I turn it off and I can ping from the command line by name or by ip. the host command seems to work just fine as it returns ip's or name pretty quickly. When I use graphical applications (x-chat, firefox etc) I cannot connect to a web site by typing in its name. I have to type in the ip, then I can connect fine (in most cases). After I have typed in the ip, I can then type in the name and connect fine. Also, I can click on links to other named sites and usually connect but if I type in the named sites...no go.

oh..for some reason, when I do a netstat when all of this not connecting is going on, it appears as if names are being resolved to 10.0.0.0 WTF?

wolfpac181
29-12-2004, 07:27 AM
Toss in some DNS, forward and reverse?

Using a lan? dialup? etc?

astro
29-12-2004, 08:15 AM
I'm guessing you're running DHCP for your IP assignment, yes?

I had this problem with a number of versions of linux. Every time you start all your networking stuff with DHCP, your /etc/resolv.conf file gets overwritten with some lame non-working default.

Solution: Either switch to a static IP and modify your /etc/resolv.conf file with your DNS IPs, or write a quick bash script to overwrite the default /etc/resolv.conf with a custom one every time you log on.

MaJeztik
29-12-2004, 12:58 PM
have you added the address to your /etc/resolv.conf ?

i dunno what mandrake is like, but I use Redhat & Gentoo. Should be the same.

**edit** yeh I should of read what astro posted.

[Martin]
04-01-2005, 01:20 AM
Solution: Either switch to a static IP and modify your /etc/resolv.conf file with your DNS IPs, or write a quick bash script to overwrite the default /etc/resolv.conf with a custom one every time you log on.

Or, you could actually fix it properly :P

edit the file /etc/sysconfig/network-scripts/ifcfg-eth1 (for the purposes of this, assume it's eth1 that's the internet device - obviously, if eth0 simply edit ifcfg-eth0)

It'll look something like this:

DEVICE=eth1
BOOTPROTO=dhcp
ONBOOT=yes
TYPE=Ethernet
PEERDNS=no

^^^ Add 'PEERDNS=no' to the end of the file. This will stop the DNS from the DHCP lease being written to resolv.conf :)

Enjoy :)

Cheers,
Martin.

astro
04-01-2005, 11:57 AM
Well, yes. That would work too. It's just been a while since I used linux (shame on astro!), and couldn't remember much of what i once knew.