Results 1 to 10 of 12
Hi!
I am a new user to Linux. I have installed RH 9.0 on my sysyetm (yes, I know it is an old version but I got the books with ...
- 04-24-2005 #1Just Joined!
- Join Date
- Apr 2005
- Posts
- 5
configuring DNS
Hi!
I am a new user to Linux. I have installed RH 9.0 on my sysyetm (yes, I know it is an old version but I got the books with it realcheap
). I have been unable to access the internet till now. I have the correct settings for the IP address and DNS (as given by my windows OS (i have a dual boot configuration)). My /etc/ resolv.conf looks as follows
search localdomain
nameserver 192.168.1.1
my /etc/hosts file lokks as follows
127.0.0.1 localhost.localdomain localhost
If I type the IP address of a site (say google.ca) I am able to reach the address but it will not resolve the name for me i.e If I type www.google.ca I get 'unable to resolve name www.google.ca. Please check the hostname and try again'. Similarly ping on the IP address works but not on the domain name. Could someone please tell what do I need to fix here. Any help oin this would be appreciated (even though this seems to be a rather trivial issue)
- 04-24-2005 #2Linux Newbie
- Join Date
- Mar 2005
- Posts
- 230
well let's see what is going on. Show me the results for the following commands:
dig www.google.com
ifconfig | grep 'inet addr'
- 04-24-2005 #3Just Joined!
- Join Date
- Apr 2004
- Posts
- 88
Sounds like you are setting the network interface static, let dhcp do it for you (pump on rh9 i think) this way the ISP will provide the info for /etc/resolv.conf and gateway etc. I think "netconfig" should allow you to do it (its been so long since I played with RH9)
- 04-25-2005 #4Just Joined!
- Join Date
- Apr 2005
- Posts
- 5
DNS configuration
Guys, thanks for taking the time to answer my question!
Silent Rage
dig www.google.com gives the following result
;<<>> DiG 9.2.1 <<>> www.google.com
;;global options : printcmd
;;connection timed out; no servers could be reached
the same happens if I use the ip addess for google instead of the fully qualified domain name
Bloggins
/sbin/ifconfig | grep 'inet addr' gives the following result (without sbin the cmd could not be found)
inet addr: 192.168.1.4 Bcast 192.168.1.255
Mask: 255.255.255.0 inet addr: 127.0.0.1 Mask: 255.0.0.0
I am using DHCP for configuring my network settings. In fact I tried both ways, using DHSP as well as trying to set static ip addresses. Currently the setting is on DHCP. Trying netconfig did not work. It said command not found. Neither did /sbin/netconfig.
Once again, thx for your time
- 04-25-2005 #5Linux Newbie
- Join Date
- Mar 2005
- Posts
- 230
It looks like you're on a LAN, so I don't recommend using DHCP at all. We're going to change your name server in /etc/resolv.conf. The current IP address appears to be pointing to your router. Even if your router does have a built in dns resolver, we probably don't want to use it.
So delete both lines from /etc/resolv.conf
search localdomain
nameserver 192.168.1.1
And add this line to /etc/resolv.conf
nameserver 127.0.0.1
If after making this change your dns doesn't work, I will want to see the results for this command:
netstat -an | grep ':53'
- 04-25-2005 #6Just Joined!
- Join Date
- Apr 2005
- Posts
- 5
I commented the lines in /etc/and added the following as you suggested
nameserver 127.0.0.1
I also changed my network settings from DHCP to static. Same result as before. The browser still says 'cannot find www.google.com. Please check the name and try again'.
Also netstat -an | grep ':53' does not give anything.
One question. If I run ipconfig /all in windows in , thge value for the DNS server is 192.168.1.1 which is the one I used in Linux also. So why is this not the actual DNS server. I though the router would be transparent to my own system . (this may be a very dumb qusetion, but please do let me know)
- 04-25-2005 #7Linux Newbie
- Join Date
- Mar 2005
- Posts
- 230
I don't know why queries to your router from linux time out. You could try this:
service iptables stop
dig @192.168.1.1 www.google.com
If that works, then you can use DHCP and/or change your name server back if you want to. If that didn't work, you can run this command instead:
service named start
- 04-26-2005 #8Just Joined!
- Join Date
- Apr 2005
- Posts
- 5
dns configuration
It worked...
thank you so much. could you tell me what did the last steps you mentioned, the ones in your last answer, what did they do? what was wrong? Do I have to do those steps evry time I log in? Once again, thanks for your help.
- 04-27-2005 #9Linux Newbie
- Join Date
- Mar 2005
- Posts
- 230
the service command stopped iptables, which is what redhat uses for a firewall. It may be that your iptables was improperly configured and UDP replies were getting blocked. If you want to have a firewall enabled, then I would be glad to help you configure it.
- 04-27-2005 #10Just Joined!
- Join Date
- Apr 2005
- Posts
- 5
dns configuration
yes, I would really appreciate your help in trying to configure the firewall. I found out that i have to stop the iptables everytime and then restrat them in order to access the internet. Since this disables the firewasll, does this mean my system is open to attacks of any nature?


Reply With Quote