LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   How to configure DNS for a local LAN (at least I think I want DNS) (https://www.linuxquestions.org/questions/linux-networking-3/how-to-configure-dns-for-a-local-lan-at-least-i-think-i-want-dns-391030/)

FlyingPenguin128 12-09-2005 04:38 PM

How to configure DNS for a local LAN (at least I think I want DNS)
 
There is a LAN party that I help run and we are trying to figure out how to set up a DNS server to basically auto forward any webpage requests to our main server webpage. (if there is a different way to do this without setting up a DNS server I am all ears)
There is no internet connection at the place we LAN and there would only be 1 DNS server (most guides I have looked at have a primary and secondary). The main server all ready has a dhcp up and running, and apache.

Thank for any help.

musicman_ace 12-09-2005 11:53 PM

http://www.linuxquestions.org/linux/..._Small_Subnets
www.bind9.net/manuals
http://www.linuxhelp.net/guides/bind/



Those should be able to get you running

FlyingPenguin128 12-10-2005 06:48 PM

Here are the files I have made and the last is the output of trying to do a nslookup.
There is something wrong but I don't know what it is or where it is. If anyone can point out any problems I would appreciate it.

db.mtvlan
Code:

$TTL 21600
@      IN      SOA    localhost. root.localhost. (
00000005; Serial Number (not a date)
21600 ; Refresh every 6 hours
3600 ; Retry every hour
1728000 ; Expire every 20 days
21600 ) ; Minimum 6 hours
IN      A      10.10.0.1
;

*      IN      A      10.10.0.1

db.0.10.10
Code:

@      IN      SOA    localhost. root.localhost. (
00000005; Serial Number (not a date)
21600 ; Refresh every 6 hours
3600 ; Retry every hour
1728000 ; Expire every 20 days
21600 ) ; Minimum 6 hours

1      IN      PTR    mtvlan.com


named.conf
Code:

zone "mtvlan.com"{
type master;
file "db.mtvlan";
allow-update { any; };
allow-transfer { any; };
allow-query { "any"; };
notify yes;
};

zone "10.10.0.in-addr.arpa" {
type master;
file "db.0.10.10";
allow-update { any; };
allow-transfer { any; };
allow-query { "any"; };
};

after I start up named
Code:

penguin:/etc/bind# nslookup mtvlan.com
Server:        127.0.0.1
Address:        127.0.0.1#53

** server can't find mtvlan.com: SERVFAIL


fur 12-11-2005 12:20 PM

You should not need these lines in your named.conf..
Code:

allow-update { any; };
allow-transfer { any; };

Also in the ptr record you need to put a period after the domain.
Code:

1      IN      PTR    mtvlan.com.

In you A record try to remove..
Code:

IN      A      10.10.0.1
And leave

Code:

*      IN      A      10.10.0.1

FlyingPenguin128 12-11-2005 12:46 PM

ok this is how my stuff looks now

db.mtvlan
Code:

$TTL 21600
@      IN      SOA    localhost. root.localhost. (
00000005; Serial Number (not a date)
21600 ; Refresh every 6 hours
3600 ; Retry every hour
1728000 ; Expire every 20 days
21600 ) ; Minimum 6 hours
*      IN      A      10.10.0.1

db.0.10.10
Code:

$TTL 21600
@      IN      SOA    localhost. root.localhost. (
00000005; Serial Number (not a date)
21600 ; Refresh every 6 hours
3600 ; Retry every hour
1728000) ; Expire every 20 day
1      IN      PTR    mtvlan.com.


named.conf.local
Code:

zone "mtvlan.com"{
type master;
file "db.mtvlan";
allow-query { "any"; };
notify yes;
};

zone "10.10.0.in-addr.arpa" {
type master;
file "db.0.10.10";
allow-query { "any"; };
};

I am seeing no change in anything. I have even gone through the default named.conf and commented out all pre entered zones.

fur 12-11-2005 02:28 PM

Did you restart named after you made the config changes?

FlyingPenguin128 12-11-2005 02:35 PM

yeah, I just killed it and restarted it.

fur 12-11-2005 03:15 PM

Here I just slapped together a basic config that will work..

named.conf

Code:

zone "." {
        type master;
        file "/etc/bind/db.root";
};



db.root

Code:

$TTL    3H
@      IN SOA  ns.    root(
        2005101100      ; serial (yyyymmddnn)
        3H          ; refresh
        20M        ; retry
        3H          ; expiry
        3H )        ; minimum
@      IN      NS      ns.
ns.    IN      A      127.0.0.1
*      IN      A      10.10.0.1



The test...


Code:

Pinky:/etc/bind# nslookup
> server localhost
Default server: localhost
Address: 127.0.0.1#53
> google.com
Server:        localhost
Address:        127.0.0.1#53

Name:  google.com
Address: 10.10.0.1
> cnn.com
Server:        localhost
Address:        127.0.0.1#53

Name:  cnn.com
Address: 10.10.0.1
>


FlyingPenguin128 12-11-2005 04:15 PM

Thanks a ton. It works perfect.


All times are GMT -5. The time now is 06:28 AM.