RH9-problem with browsing Internet: domain names-errors, using IP-OK.
I'm new to Linux and I have a problem with browsing the Internet. I have RedHat 9 and I'm connected to the Internet through a router.
When I use domain names in Mozilla or Nautilus, I get errors. When I navigate using "direct" IP numbers, everything seems to be OK. Furthermore, I cannot ping sites by their names, although dig, host and nslookup return no errors. My DNS is set to the same address I have set under Win XP on the same computer - and under Win name solving works fine. (I have VIA VT86c100A Rhine-II PCI network card, if this information can help) Any help would be great. |
welcome to LQ!!! :)
please post the output of: Code:
cat /etc/resolv.conf Code:
win32sux@candystore:~$ ping google.com |
Hi,
This is cat output: ; generated by /sbin/dhclient-script nameserver 192.168.2.1 search agpg And yes, I get exactly the error you described, "unknown host". |
well, considering your resolv.conf looks fine, i'd say it could be either your local iptables rules or perhaps your dns resolver is bugging-out... you can check (and post) your iptables rules with:
Code:
iptables -L -v -n |
As a matter of fact, I don't get much of my iptables' output, which is
Code:
[root@agpg root]# iptables -L -v -n I hope my iptables can help; I'm kind of confused and I don't really know what to do with the results. Best regards, o-circ |
okay, well, let's rule-out an iptables issue by using some super-simple rules... execute this script and see if it helps... this script basically just sets some sane policies, clears all your chains, and sets two known-good rules... make sure you check that the script executed properly by doing another "iptables -L -v -n" right after...
Code:
#!/bin/sh |
The simplish solution is to find out the DNS server your ISP uses, should be x.x.x.x where x = 1-254.
If you want to test if it works, try. Code:
nameserver 192.168.2.1 |
Hi,
changing DNS into "external" one solved the problem! Everything works fine now (at least I hadn't found anything wrong till now). Thanks a lot, v00d00101! And thanks to you, win32sux - now I know a little bit more about Linux. :) Would you be so kind and tell me, how to switch off DNS auto-detection? I don't like the idea of changing resolv.conf every time I reboot... Cheers, o-circ PS: Funny, it was the first post I could write under Linux. :) |
hehe, glad you got it working, even though it's more of a work-around than a solution... not sure why you are experiencing this, perhaps it's an issue with the leases on your router or something... in any case, you could give your box a static IP configuration to achieve what you want... but if you truly want to leave it on DHCP but prevent resolv.conf from getting written to, then i'd imagine a quick and dirty way to achieve that is giving it read-only permissions like:
Code:
chmod 400 /etc/resolv.conf |
I changed resolv.conf permissions with success, but the script ignored it somehow (?!) and overwrote my settings...
But another solution was found: adding this Code:
echo nameserver x.x.x.x > /etc/resolv.conf Thanks again for helping me! o-circ |
All times are GMT -5. The time now is 08:44 AM. |