LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-09-2005, 05:38 PM   #1
FlyingPenguin128
LQ Newbie
 
Registered: May 2005
Posts: 12

Rep: Reputation: 0
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.
 
Old 12-10-2005, 12:53 AM   #2
musicman_ace
Senior Member
 
Registered: May 2001
Location: Indiana
Distribution: Gentoo, Debian, RHEL, Slack
Posts: 1,555

Rep: Reputation: 46
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
 
Old 12-10-2005, 07:48 PM   #3
FlyingPenguin128
LQ Newbie
 
Registered: May 2005
Posts: 12

Original Poster
Rep: Reputation: 0
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
 
Old 12-11-2005, 01:20 PM   #4
fur
Member
 
Registered: Dec 2003
Distribution: Debian, FreeBSD
Posts: 310

Rep: Reputation: 35
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
 
Old 12-11-2005, 01:46 PM   #5
FlyingPenguin128
LQ Newbie
 
Registered: May 2005
Posts: 12

Original Poster
Rep: Reputation: 0
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.
 
Old 12-11-2005, 03:28 PM   #6
fur
Member
 
Registered: Dec 2003
Distribution: Debian, FreeBSD
Posts: 310

Rep: Reputation: 35
Did you restart named after you made the config changes?
 
Old 12-11-2005, 03:35 PM   #7
FlyingPenguin128
LQ Newbie
 
Registered: May 2005
Posts: 12

Original Poster
Rep: Reputation: 0
yeah, I just killed it and restarted it.
 
Old 12-11-2005, 04:15 PM   #8
fur
Member
 
Registered: Dec 2003
Distribution: Debian, FreeBSD
Posts: 310

Rep: Reputation: 35
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
>
 
Old 12-11-2005, 05:15 PM   #9
FlyingPenguin128
LQ Newbie
 
Registered: May 2005
Posts: 12

Original Poster
Rep: Reputation: 0
Thanks a ton. It works perfect.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
help needed to setup a DNS server can anyone say how to configure a DNS server subha Linux - Networking 4 04-28-2012 12:50 AM
configure pppoe to use local dns server siva_raju78 Linux - Networking 1 07-10-2005 02:20 PM
how does dns/host names work on local lan gman_O0O0 Linux - Networking 1 04-11-2005 01:22 AM
dns check outside dns before local reaky Linux - Networking 1 02-22-2004 10:27 AM
need some local DNS help rnorton Linux - Networking 4 02-10-2003 06:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration