Click to See Complete Forum and Search --> : local DNS names
NeilBlue
12-02-2000, 09:29 AM
Hello,
Using: mandrake 7.2, KDE 2.0
Please could someone tell me how to change the local DNS list on my machine so that I can access unregistered domain names.
Thank you.
Hey:
DNS is a very advanced topic, and I don't yet fully understand it myself, but I'll try and help.
I have setup my own local DNS server, ENS, which is a very small DNS server useful for a LAN or workstation.
It's easy to configure, and may answer your problem... You may want to look at the DNS howto at http://www.linuxdoc.org/HOWTO/DNS-HOWTO.html
You can get ENS at: http://freshmeat.net/projects/ens/?highlight=ENS
---
Ciao, Jamie
jamie@inetezine.org
Power to the penguin!
tryster
12-04-2000, 10:56 PM
Another Cheezy solution by tryster:
The "real" linux people will cringe but here's a solution using the "out of the box" Bind that came with your distribution. In your /etc/rc.d/init.d there should be a file called "named" . If not install the "bind" rpm(s)
If you read the HOWTO from the last message this will be alot easier. The Idea here is that you don't want to make a "root.hints" file, then you won't be uploading stuff to the root servers and all will be happy on your internal bogas internet -- if that's what you wanted.
you'll need to create a file called "named.conf" in the /etc directory. I'm making mine public here for example, becuase it is, you can poke it with a stick with nslookup, check it out, but please don't use my ip's...it will piss me off http://www.linuxnewbie.org/ubb/smile.gif
assume I got these ip's:
127.0.0.1 localhost
206.196.60.211 my external ip
kel-net.com my bad domain name
make a config file in /etc called "named.conf" here's mine, the entries point to files in /var/named/zone
#kel-net config file
options {
directory "/var/named";
};
#zone "." { DON'T DO THIS ONE !!!!
# type hint;
# file "root.hints";
#};
zone "kel-net.com"{
type master;
file "zone/kel-net.com";
};
zone "0.0.127.in-addr.arpa"{
type master;
file "zone/127.0.0";
};
zone "60.196.206.in-addr.arpa"{
type master;
file "zone/206.196.60";
};
#end config file
now make your zone "soa" files:
#here is 127.0.0.1
@ IN SOA kel-net.com. sysadmin.kel-net.com. (
2000120400 ; serial
10800 ; refresh
3600 ; retry
3600000 ; expire
86400 ; default_ttl
)
;
@ IN NS kel-net.com.
@ IN NS ns.remotepoint.com.
@ IN MX 10 kel-net.com.
1 IN PTR localhost.
#here is 206.196.60.211
1 IN PTR ns.kel-net.com.
$ORIGIN 196.206.in-addr.arpa.
60 IN SOA kel-net.com. sysadmin.kel-net.com. (
2000120400 ; serial
10800 ; refresh
3600000 ; expire
86400 ; default_ttl
)
60 IN NS kel-net.com.
60 IN NS ns.remotepoint.com.
60 IN MX 10 kel-net.com.
# here is kel-net.com
@ IN SOA kel-net.com. sysadmin.kel-net.com. (
2000120400 ; serial
10800 ; refresh
3600 ; retry
3600000 ; expire
86400 ; default_ttl
)
;
@ IN NS kel-net.com.
@ IN NS ns.remotepoint.com.
@ IN MX 10 kel-net.com.
@ IN HINFO i586 Linux
@ IN TXT "kel-net.com - an ISP just becuase i can"
localhost. IN A 127.0.0.1
kel-net.com. IN A 206.196.60.211 www.kel-net.com. (http://www.kel-net.com.) IN A 206.196.60.211
# these are 3 different files. hopefully the formating will look better than it does in this text box.
The Idea is to make a different entry in your named.conf and an soa file in /var/named/zone for every "bogas" domain.
now start "named" ../etc/rc.d/init.d/named start (it will, but that doesn't make it good) check /var/log/message for errors. errors will cause a reject message to appear. usually a bad period or some other syntax error.
all should be happy if there's no errors. make your other boxes use your dns for one of their nameservers.
I just set this up so the root servers won't all sync up for a day or so. There are different soa files floating around for my domain but the old ones will eventually get replaced based on the serial number.
--good luck to us both, may the root sever gods be pleased with our configuration.
Stuka
12-05-2000, 12:51 PM
To answer your question very simply - edit your /etc/hosts file. Each entry looks like:
127.0.0.1 localhost
192.168.0.1 mycomputer
Where the name follows the IP address. This will save you from DNS pain.
nanode
12-06-2000, 02:48 AM
You can setup DNS the right way and still use imaginary TLDs. Observe:
/*
* section of /etc/named.conf
*/
zone "node" {
type master;
file "dotnode";
};
that basically means, any request for "*.node" will be directed to the zone file "dotnode" Now, anyone wanting to acess a "*.node" host needs to use my DNS, but that's easy.
If I want to few my friend's page "http://chao.jaq" I add this into /etc/named.conf
zone "jaq" {
type forward;
forwarders {
209.232.87.24;
};
};
Unless you setup a corresponding httpd virtual host, or something similar, this is simply a clever alias for your internet box.
NeilBlue
12-07-2000, 02:58 AM
Thank you all, I will try with the easiet method first, but all this will be useful as I attempt to master the ways of DNS http://www.linuxnewbie.org/ubb/smile.gif
Neil