LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   DNS Server not working on Linux Router (https://www.linuxquestions.org/questions/linux-networking-3/dns-server-not-working-on-linux-router-315341/)

Trano 04-20-2005 11:28 AM

DNS Server not working on Linux Router
 
I am trying to set up a Slackware 10 router for my network. I want this server to act as a DNS server as well. I have installed the BIND package that comes with Slackware and am using the default configuration.

My external interface (eth0) gets DHCP. This sets the nameservers in resolv.conf to 10.141.8.1 and 10.141.8.2 which is correct. If I run dig on the router with these nameservers, it resolves correctly. If I then set resolv.conf to use 127.0.0.1 as my nameserver, it will also resolve correctly.

The problem is that on my internal network I set the DNS server to the internal interface of the router (eth1 - 192.168.1.1). The internal computers cannot resolve.

I have looked around and can't figure out why. Do I have to set up a zone for the internal network? Currently the only zones I have are ".","localhost", and"0.0.127.in-addr.arpa". These are the ones that were in the default configuration for a caching DNS server.

Does anyone know why this is happening?

Thank you for any help.

masand 04-20-2005 12:37 PM

have u set the routes correctly on the internal systems???

run

route -n

on internal computers

regards

Trano 04-20-2005 02:17 PM

All the internal computers are running windows.

Each of the internal computers gets DHCP from the router which assigns the range 192.168.1.100-192.168.1.254/24 and sets the default gateway and DNS server to the router's internal nic (192.168.1.1) using option routers and option domain-name-servers in dhcpd.conf.

For some reason, it is slightly working now. As long as I leave the router's resolv.conf to have the DNS servers it gets from it's DNS, I can resolve from a non-authoritive server, which means it is working off the external servers. But if I set resolv.conf to use itself and restart BIND, the windows computers cannot resolve and the router can.

At least it is working now, but why would it not work with 127.0.0.1 in resolv.conf?

Thank you for your response.

masand 04-20-2005 02:38 PM

there is no reason for me that it should not work
also when it does not work then

run

ipconfig
tracert yahoo.com
ping yahoo.com

on win machines

regards
and

Trano 04-21-2005 11:40 AM

Well it now seems to be working sometimes with 127.0.0.1. Ipconfig /all gives me:


Ethernet adapter Wireless Network Connection:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Intel(R) PRO/Wireless 2200BG Network Connection
Physical Address. . . . . . . . . : 00-0E-35-0D-C0-3A
Dhcp Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IP Address. . . . . . . . . . . . : 192.168.1.250
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1
DHCP Server . . . . . . . . . . . : 192.168.1.1
DNS Servers . . . . . . . . . . . : 192.168.1.1
Lease Obtained. . . . . . . . . . : Thursday, April 21, 2005 10:20:58 AM
Lease Expires . . . . . . . . . . : Thursday, April 21, 2005 10:20:58 PM


Tracert, and ping bothwork (I wont show you the output, it doesn't show much, pings are blocked on the network I am testing on, they think it uses too much bandwidth), but nslookup gives an error sometimes. Occasionally it will work, and the rest of the time I get:


C:\Documents and Settings\Administrator>nslookup yahoo.com
DNS request timed out.
timeout was 2 seconds.
*** Can't find server name for address 192.168.1.1: Timed out
*** Default servers are not available
Server: UnKnown
Address: 192.168.1.1

DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
*** Request to UnKnown timed-out


When it does work I get:


C:\Documents and Settings\Administrator>nslookup yahoo.com
*** Can't find server name for address 192.168.1.1: Non-existent domain
*** Default servers are not available
Server: UnKnown
Address: 192.168.1.1

DNS request timed out.
timeout was 2 seconds.
Non-authoritative answer:
Name: yahoo.com
Addresses: 216.109.112.135, 66.94.234.13


What is strange is that there is no way to predict which will occur, one will sometimes, and sometimes its the other.

masand 04-21-2005 01:41 PM

if it is working sometimes and failing sometimes then i think u should consider putting an alternate entry of the nameserver of ur ISP

regards


All times are GMT -5. The time now is 09:26 PM.