VectorLinux
August 27, 2014, 05:01:18 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1]
  Print  
Author Topic: Can't get DNS to work  (Read 3638 times)
stryderX
Member
*
Posts: 9


« on: December 25, 2009, 05:39:28 pm »

Hi all,

I've installed VL 6.0 on an older PC on my home network, but I can't seem to get DNS to work. My router is my DNS server, so my resolv.conf has
nameserver 192.168.1.1
like my other linux boxes (Ubuntu and CentOS) that work fine. I can ping the IP address of any local computer or internet site, but it won't recognize the names. I tried adding a public DNS, but that didn't do anything. When I log into my router, I can see this computer with it's proper name and IP. I've gone through VASM and I don't have a firewall active. I looked at /etc/rc.d/rc.inet0 and rc.inet1: inet0 did not include my Gateway (router) and fields in inet1 were blank. I'm at wits end here trying to get this to work. Once I get DNS, then I can move on to mount NAS server samba shares. Can anyone help?

Thanks!
Logged
bigpaws
Vectorian
****
Posts: 1847


« Reply #1 on: December 25, 2009, 08:07:02 pm »

The place to look maybe route.

Log in as root and type:

route

Check the ip address to see that your router is listed.

Check /etc/resolv.conf to see if you have a seach entry.

HTH

Bigpaws
Logged
stryderX
Member
*
Posts: 9


« Reply #2 on: December 26, 2009, 12:07:41 am »

My router is listed in the Kernel IP routing table:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     *               255.255.255.0   U     0      0        0 eth0
loopback        *               255.0.0.0       U     0      0        0 lo
default         192.168.1.1     0.0.0.0         UG    0      0        0 eth0

I do not have a search entry in resolv.conf (I don't have one on my other 2 linux boxes). I'm not in a sub-domain because this is a home network, so I'm not even sure what I should use for that? Everything I've read indicates that I shouldn't need one.

I don't know if this helps, but if I ping this computer (gimli) from another machine on my local network, it comes back with an IP address that is not in my local network (63.123.155.104). I have no idea where this is, but it doesn't return pings.

thanks
« Last Edit: December 26, 2009, 12:12:17 am by stryderX » Logged
hata_ph
Packager
Vectorian
****
Posts: 3256


-- Just being myself --


« Reply #3 on: December 26, 2009, 02:18:54 am »

Did you put your ISP's DNS at your router?
Logged
gamfa
Vectorite
***
Posts: 245



« Reply #4 on: December 26, 2009, 04:03:25 am »

I have always had to have nameservers listed in resolv.conf to get name resolution even though they are also listed at the wireless router. They should read like this...

Quote
nameserver 208.67.222.222
nameserver 208.67.220.220
nameserver 66.174.95.44
nameserver 69.78.96.14

The top 2 are Opendns and the last two are the peer dns machines. Another problem I've had is the location of the resolv.conf file. Some apps want it in /etc while others want it in /etc/ppp.
« Last Edit: December 26, 2009, 04:16:32 am by gamfa » Logged

"Don't tell my cattle I have leather seats in my truck"

"I never let schooling stand in the way of my education"...Mark Twain
stryderX
Member
*
Posts: 9


« Reply #5 on: December 26, 2009, 01:28:48 pm »

I tried adding my ISP's DNS to resolv.conf plus the OpenDNS servers. Each time I reboot, the only thing that remains in resolv.conf is my router IP. Everything else is deleted except for the comment at the top: '# Generated by dhcpcd for interface eth0'. Perhaps I have a conflict somewhere? Clearly something (dhcpcd?) is overwriting my resolv.conf.
Logged
gamfa
Vectorite
***
Posts: 245



« Reply #6 on: December 26, 2009, 04:21:50 pm »

There is a debug switch in /etc/rc.d/rc.init1.conf that you could set to "yes". That might give you a little more info.
Logged

"Don't tell my cattle I have leather seats in my truck"

"I never let schooling stand in the way of my education"...Mark Twain
stryderX
Member
*
Posts: 9


« Reply #7 on: December 26, 2009, 05:02:01 pm »

So here's the eth0 part of my /etc/rc.d/rc.inet1.conf (I recently added the KEEPRESOLV, KEEPNTP, KEEPGW)
# Config information for eth0:
IPADDR[0]=""
NETMASK[0]="255.255.255.0"
USE_DHCP[0]="yes"
DHCP_HOSTNAME[0]=""
DHCP_KEEPRESOLV[0]="yes"
DHCP_KEEPNTP[0]="yes"
DHCP_KEEPGW[0]="yes"
# Default gateway IP address:
GATEWAY="192.168.1.1"
DEBUG_ETH_UP="yes"

Despite the DHCP_KEEPRESOLV[0]="yes", my resolv.conf was still overwritten. I'm also not sure where/how to get the debug output. I expected to see something when I ran:
> dhcpcd -ko
> dhcpcd eth0
but I got nothing back. I rebooted and looked in /var/log/debug, but there wasn't any more DHCP info than before. I didn't see any obvious problems in /var/log/messages.
Logged
hata_ph
Packager
Vectorian
****
Posts: 3256


-- Just being myself --


« Reply #8 on: December 26, 2009, 05:14:48 pm »

DHCP will overwrite your /etc/resolv.conf each time it get an dynamic IP from your router/DHCP server. If you router have the DHCP enable, set what ever DNS you want it to.

BTW, what is your problem actually? Your VL box cannot connect to internet or cannot ping other linux box with their hostname? Now only I notice I am not sure what is your problem..hahahaha
« Last Edit: December 26, 2009, 05:18:18 pm by hata_ph » Logged
stryderX
Member
*
Posts: 9


« Reply #9 on: December 26, 2009, 05:35:27 pm »

The problem is that the VL box can't resolve ANY domain names, local or otherwise, but I can access them directly via IP addresses. So I can successfully ping 64.50.236.52, but 'ping vectorlinux.osuosl.org' returns' ping: unknown host vectorlinux.osuosl.org'. My router (192.168.1.1) is my local DNS and using that for my Ubuntu and CentOS machines works fine.


My /etc/dhcpcd/dhcpcd-eth0.info looks like it has everything:
IPADDR=192.168.1.206
NETMASK=255.255.255.0
NETWORK=192.168.1.0
BROADCAST=192.168.1.255
GATEWAY=192.168.1.1
DNS=192.168.1.1
DHCPSID=192.168.1.1
DHCPGIADDR=0.0.0.0
DHCPSIADDR=0.0.0.0
DHCPCHADDR=00:E0:7D:B5:1C:82
DHCPSHADDR=00:22:3F:0A:62:A4
DHCPSNAME=''
LEASETIME=86400
RENEWALTIME=43200
REBINDTIME=75600
INTERFACE='eth0'
CLASSID='Linux 2.6.27.12 i686'
CLIENTID=00:E0:7D:B5:1C:82
Logged
bigpaws
Vectorian
****
Posts: 1847


« Reply #10 on: December 26, 2009, 06:12:36 pm »

Did you enter the DNS ip servers address as root?

Also check permissions on /etc/resolv.conf

Please list the type of router that you have.

Bigpaws
Logged
stryderX
Member
*
Posts: 9


« Reply #11 on: December 26, 2009, 09:27:33 pm »

-rw-r--r-- 1 root root 64 2009-12-26 17:47 resolv.conf
So yes, I did enter the servers as root.
My router is a Netgear WNR2000 that I've been using for about a year.
I'm certainly not ruling out the possibility this problem is something stupid I did without realizing it.
Logged
stryderX
Member
*
Posts: 9


« Reply #12 on: December 27, 2009, 12:57:55 am »

I had this sneaking suspicion that it was something stupid and it turns out I was right.Embarrassed About a month ago I tried to solve the problem of seeing local machines by name, but I didn't find a solution and couldn't get back to it until recently. I had modified /etc/nsswitch.conf to add wins and winbind to the hosts line. What I ended up with was:
hosts:     files [NOTFOUND=return] dns wins winbind
so it quit looking beforfe getting to dns. I still haven't solved the original problem, but I'll pursue that in a separate thread. Thank you to everyone who responded to help - sorry for wasting your time.

stryderX
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!