View previous topic :: View next topic |
Author |
Message |
theneb n00b

Joined: 07 Jan 2005 Posts: 38 Location: UK
|
Posted: Fri Feb 11, 2005 2:06 am Post subject: DNS Intranet |
|
|
Another dns related enquiry by me but I've got Bind nicely working now, dig -x 192.168.0.1 now finds my dns server from another computer.
I'm doing this for a LAN party this saturday, the only thing I need to get sorted out is the forwarding of domain names onto an ip,
Basically it's an intranet with no net access, what sort of zone file should I create to achieve this? |
|
Back to top |
|
 |
yaneurabeya Veteran


Joined: 13 May 2004 Posts: 1754 Location: Seattle
|
Posted: Fri Feb 11, 2005 3:54 am Post subject: |
|
|
Don't mind me, I just want to find out too . |
|
Back to top |
|
 |
mrunge n00b

Joined: 02 Feb 2005 Posts: 10
|
Posted: Fri Feb 11, 2005 1:34 pm Post subject: |
|
|
Hi,
just create a zone 192.168.0 and a reverse lookup zone.
But why do you want a name server for a lan party? If you don't have internet access, you don't need a name server.
Or do you want to map all name requests to one ip-adress (eg. to show a
web page "no internet access today")?
Maybe you want to set up a dhcp-server to distribute ip-addresses?
In this case you are able to provide the clients with your dns.
Matthias |
|
Back to top |
|
 |
theneb n00b

Joined: 07 Jan 2005 Posts: 38 Location: UK
|
Posted: Fri Feb 11, 2005 10:54 pm Post subject: |
|
|
The reason I'm doing this is so that at the lan party peeps can just type in something like:
server.net and get first of all the internel webpage.
Also stuff like:
cs.server.net -Counter Strike server
ut.server.net - Unreal Tourny server
I.e you get resolving names for all the servers.
And yes already using DHCP to distribute all the addresses and setup some static ones.
Oh, Just read up on WINS, maybe this would be a better solution? As I could just tell em a wins server for windows clients and hosts file for linux clients (if I get any) |
|
Back to top |
|
 |
mrunge n00b

Joined: 02 Feb 2005 Posts: 10
|
Posted: Sun Feb 13, 2005 3:37 pm Post subject: |
|
|
Ah, I see.
Did you ever try to comment out the . (root servers) in /var/named/somefile
Sorry, I forgot the name of the master zone file name. This file has a list of
master name servers. You should modify this to refelct your server as *the*
master server.
But: Did you try your favorite Shooter in offline mode? Does it work if the game
does not reach a valve-server? Are you shure it doesn't need some reply from
valve?
Oh, just try to add
some.server.net/org
to your /etc/hosts and try if it works for your case.
Matthias |
|
Back to top |
|
 |
yaneurabeya Veteran


Joined: 13 May 2004 Posts: 1754 Location: Seattle
|
Posted: Mon Feb 14, 2005 9:04 am Post subject: |
|
|
If memory serves me correctly there is actually an option in either the server args or the conf file that would allow the server to work with a LAN that doesn't have WAN access. |
|
Back to top |
|
 |
mrv Tux's lil' helper

Joined: 29 Mar 2004 Posts: 114 Location: Oulu, Finland
|
Posted: Mon Feb 14, 2005 12:31 pm Post subject: |
|
|
You should take a look at net-dns/dnsmasq. It should work well for your purposes. You just need to put the entries (like cs.server.net, ut.server.net) into the server's /etc/hosts and dnsmasq can dig them out from there!
-mrv- |
|
Back to top |
|
 |
nat Apprentice


Joined: 04 Sep 2002 Posts: 205
|
Posted: Tue Feb 22, 2005 9:45 am Post subject: |
|
|
mrv wrote: | You should take a look at net-dns/dnsmasq. It should work well for your purposes. You just need to put the entries (like cs.server.net, ut.server.net) into the server's /etc/hosts and dnsmasq can dig them out from there! |
An alternative to dnsmasq is net-dns/dnrd (in case you don't want an integrated dhcp server). Dnrd alows you to have a dedicated "master" file that is separated from the /etc/hosts file.
Code: | emerge net-dns/dnrd
mkdir -p /etc/dnrd |
Now put your domain name and hostnames in /etc/dnrd/master:
Code: | domain server.net auth+ ns ns.server.net
192.168.0.1 ns
192.168.0.10 cs
192.169.0.11 ut
...
|
Make dnrd listen on all interfaces by removing the -a option in /etc/conf.d/dnrd
Start dnrd: Code: | /etc/init.d/dnrd start |
That should give you a simple dns server that only solves the domainnames in your LAN. The reverse zone is created automatically. |
|
Back to top |
|
 |
nobspangle Veteran


Joined: 23 Mar 2004 Posts: 1318 Location: Manchester, UK
|
Posted: Tue Feb 22, 2005 5:39 pm Post subject: |
|
|
here is a zone file that will do what you need
Code: | $ORIGIN server.net.
@ IN SOA ns.server.net. admin.server.net. (
2005022201
24h
1h
4W
1h )
IN NS ns
IN A 192.168.0.2
ns IN A 192.168.0.1
cs IN A 192.168.0.3
ut IN A 192.168.0.4 |
This zonefile is for a domain called server.net.
The dns server is on 192.168.0.1, cs.server.net is 192.168.0.3, ut.server.net is 192.168.0.4, server.net is mapped to 192.168.0.2. |
|
Back to top |
|
 |
|