View Full Version : Setting up DNS in linux
OK, I've went through the DNS-HOWTO n times and still can't get this thing to work, nevermind understanding anything about the setup of those files.
Can anyone please help me?!?! I just want to set up DNS and have some instructions that works and let's me understand what I'm doing (no use in just doing it and not understanding it)
I'm setting up everything through SSH (PuTTY :p)
This is just one step towards IP masquerading. I still need a Linux supported modem and for that I still need money. SIGH
It all comes down to the fact that I want to dial-up to my ISP with the more stable Linux box and browse with my windows pc, and when my windows pc gives me crap, I can just restart it or something without worying about losing the connection and losing out special weekend price call capping feature.
Okay, which files are you taking about? Are you trying to configure BIND on your Linux box? Or, are you trying to figure out the hosts files?
Clarify a little and I can help.
One thing that I would recomend you doing is configure BIND as a caching-only name server and use it to handle all local DNS queries on your network. This is more efficient, and thus makes web surfing a lot faster.
Stef
basically trying to setup bind.
say for instance the domain is homedomain and the linux box is p166mmx.homedomain.
now with my windows pc setup correctly I want to type in p166mmx.homedomain and I should get the linuxbox's IP.
I've tried the DNS-Howto but it didn't work
Ok. I've finally got something working across the network.
Here's the stuff
named.conf
options {
directory "/var/named";
};
// a caching only nameserver config
zone "." {
type hint;
file "named.ca";
};
zone "0.0.127.in-addr.arpa" {
type master;
file "named.local";
};
zone "homedomain" {
type master;
notify no;
file "homedomain";
};
zone "1.168.192.in-addr.arpa" {
type master;
notify no;
file "192.168.1";
homedomain
$TTL 3D
@ IN SOA ns.homedomain. root.homedomain. (
200204081 ; serial
8H ; refresh
2H ; retry
4W ; expire
1D ) ; minimum TTL
;
TXT "I've managed DNS!"
NS ns ; Inet Address of name server
MX 10 mail ; Primary Mail Exchanger
;
localhost A 127.0.0.1
ns A 192.168.1.100
MX 10 mail
www.p166mmx CNAME ns
p166mmx CNAME ns
mail A 192.168.1.100
MX 10 mail
ftp A 192.168.1.100
MX 10 mail
I'm not sure if the www.p166mmx part is correct although it works. Since I'm not entirely sure how everything exactly works and how I should make use of zones.
I would appreciate some tips and pointers here, I guess that just another way I'm gonna learn :p
I would'nt configure an entire zone just for one computer. In your case it would be much better to setup a simple DNS caching-only nameserver.
The way this works is much better. You configure BIND to use your ISP's DNS servers as forwarders and BIND keeps an active database of each DNS querie in cache. When your Linux box or other boxes on your local network request a DNS querie BIND awnsers directly from it cached database :D
You would set it up like this:
options {
directory "/var/named";
allow-query { localhost; 192.168.0/24; }
allow-resursion { localhost; 192.168.0/24; }
forward first;
forwarders { ISP's DNS servers; go here; }
listen-on { 127.0.0.1; 192.168.0.1; }
};
zone "." {
type hint;
file "named.ca";
};
zone "0.0.127.in-addr.arpa" {
type master;
file "named.local";
};
Then change /etc/resolv.conf to
nameserver 127.0.0.1
and point your WIndows box to your Linux IP for DNS queries.
That's all, much simpler, more secure, and faster.
To get your local boxes to recognize each others host names just put them in the c:\windows\hosts file or /etc/hosts
ex:
# c:\windows\hosts
127.0.0.1 localhost
192.168.0.1 linuxbox.homedomain.net linuxbox
192.168.0.2 p166mmx.homedomain.net 166mmx
That way when you type, ping p166mmx.homedomain.net you get 192.168.0.2, or you can even type ping 166mmx and get the same thing :D
Also, I would recomend that you use IPTables to filter your DNS activity. You don't want a hacker messing with BIND :D We can work on that later, try this out and see if it works.
Stef
ok, stef. got that up and runnin'
whas some trouble doing it in win2k but Find saved the day :)
Damn I just wish I could get my hands on a descent modem now. This win2k dialup is crap!
Good to hear things worked out :D Hope you find a modem soon.
BTW< I would go for an external modem or try to find an ISA modem. External or ISA modems are the best.
Stef
Yeah, I just can't wait to use Linux to dial-up.
Modems, especially external, are to expensive for me but I know someone that might get me one :)
I just hope that she can get it for me
vBulletin® v3.8.4, Copyright ©2000-2010, Jelsoft Enterprises Ltd.